MAPREDUCE-7319. Log list of mappers at trace level in ShuffleHandler audit log.

Contributed by Jim Brennan.

(cherry picked from commit 462561654b)
This commit is contained in:
Eric Badger 2021-02-09 19:23:23 +00:00
parent 0661977821
commit 9c620c6302
1 changed files with 7 additions and 2 deletions

View File

@ -1174,8 +1174,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());
}
}
}