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 863da7efde..06a3e42903 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 @@ -992,13 +992,6 @@ public void messageReceived(ChannelHandlerContext ctx, MessageEvent evt) return; } - // this audit log is disabled by default, - // to turn it on please enable this audit log - // on log4j.properties by uncommenting the setting - if (AUDITLOG.isDebugEnabled()) { - AUDITLOG.debug("shuffle for " + jobQ.get(0) + " mappers: " + mapIds + - " reducer " + reduceQ.get(0)); - } int reduceId; String jobId; try { @@ -1183,6 +1176,17 @@ protected void populateHeaders(List mapIds, String jobId, // Now set the response headers. setResponseHeaders(response, keepAliveParam, contentLength); + + // this audit log is disabled by default, + // to turn it on please enable this audit log + // on log4j.properties by uncommenting the setting + if (AUDITLOG.isDebugEnabled()) { + StringBuilder sb = new StringBuilder("shuffle for ").append(jobId); + sb.append(" mappers: ").append(mapIds); + sb.append(" reducer ").append(reduce); + sb.append(" length ").append(contentLength); + AUDITLOG.debug(sb.toString()); + } } protected void setResponseHeaders(HttpResponse response,