From 37971c71d196aef95bd2d393ef0cede6d1d9eb3c Mon Sep 17 00:00:00 2001 From: Eric Badger Date: Tue, 9 Feb 2021 19:03:20 +0000 Subject: [PATCH] MAPREDUCE-7319. Log list of mappers at trace level in ShuffleHandler audit log. Contributed by Jim Brennan. (cherry picked from commit 462561654bb37dc1d453bfe15c3e75c274bbfb02) --- .../java/org/apache/hadoop/mapred/ShuffleHandler.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 62be3a08e8a..1d5b475ea7a 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 @@ -1170,8 +1170,13 @@ public class ShuffleHandler extends AuxiliaryService { StringBuilder sb = new StringBuilder("shuffle for "); sb.append(jobId).append(" reducer ").append(reduce); sb.append(" length ").append(contentLength); - sb.append(" mappers: ").append(mapIds); - AUDITLOG.debug(sb.toString()); + if (AUDITLOG.isTraceEnabled()) { + // For trace level logging, append the list of mappers + sb.append(" mappers: ").append(mapIds); + AUDITLOG.trace(sb.toString()); + } else { + AUDITLOG.debug(sb.toString()); + } } }