MAPREDUCE-6958. Shuffle audit logger should log size of shuffle transfer. Contributed by Jason Lowe
(cherry picked from commit 3a20debdde
)
This commit is contained in:
parent
1944b0b286
commit
41c2a73c52
|
@ -990,13 +990,6 @@ public class ShuffleHandler extends AuxiliaryService {
|
|||
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 {
|
||||
|
@ -1181,6 +1174,17 @@ public class ShuffleHandler extends AuxiliaryService {
|
|||
|
||||
// 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 ");
|
||||
sb.append(jobId).append(" reducer ").append(reduce);
|
||||
sb.append(" length ").append(contentLength);
|
||||
sb.append(" mappers: ").append(mapIds);
|
||||
AUDITLOG.debug(sb.toString());
|
||||
}
|
||||
}
|
||||
|
||||
protected void setResponseHeaders(HttpResponse response,
|
||||
|
|
Loading…
Reference in New Issue