From 5ac6abe107f56c3a787ee62b92181bc183623e2c Mon Sep 17 00:00:00 2001 From: Alejandro Abdelnur Date: Mon, 18 Mar 2013 18:45:55 +0000 Subject: [PATCH] MAPREDUCE-4990. Construct debug strings conditionally in ShuffleHandler.Shuffle#sendMapOutput(). (kkambatl via tucu) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1457914 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/mapred/ShuffleHandler.java | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index e76f76840f..cb16faec11 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -194,6 +194,9 @@ Release 2.0.5-beta - UNRELEASED MAPREDUCE-4892. Modify CombineFileInputFormat to not skew input slits' allocation on small clusters. (Bikas Saha via vinodkv) + MAPREDUCE-4990. Construct debug strings conditionally in + ShuffleHandler.Shuffle#sendMapOutput(). (kkambatl via tucu) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java index 56ede18706..0beb43092a 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java @@ -549,15 +549,19 @@ protected ChannelFuture sendMapOutput(ChannelHandlerContext ctx, Channel ch, ContainerLocalizer.USERCACHE + "/" + user + "/" + ContainerLocalizer.APPCACHE + "/" + ConverterUtils.toString(appID) + "/output" + "/" + mapId; - LOG.debug("DEBUG0 " + base); + if (LOG.isDebugEnabled()) { + LOG.debug("DEBUG0 " + base); + } // Index file Path indexFileName = lDirAlloc.getLocalPathToRead( base + "/file.out.index", conf); // Map-output file Path mapOutputFileName = lDirAlloc.getLocalPathToRead( base + "/file.out", conf); - LOG.debug("DEBUG1 " + base + " : " + mapOutputFileName + " : " + - indexFileName); + if (LOG.isDebugEnabled()) { + LOG.debug("DEBUG1 " + base + " : " + mapOutputFileName + " : " + + indexFileName); + } final IndexRecord info = indexCache.getIndexInformation(mapId, reduce, indexFileName, user); final ShuffleHeader header =