MAPREDUCE-5023. History Server Web Services missing Job Counters (Ravi Prakash via tgraves)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1454156 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a3c4488efd
commit
7122cb5bf4
@ -804,6 +804,9 @@ Release 0.23.7 - UNRELEASED
|
|||||||
MAPREDUCE-5043. Fetch failure processing can cause AM event queue to
|
MAPREDUCE-5043. Fetch failure processing can cause AM event queue to
|
||||||
backup and eventually OOM (Jason Lowe via bobby)
|
backup and eventually OOM (Jason Lowe via bobby)
|
||||||
|
|
||||||
|
MAPREDUCE-5023. History Server Web Services missing Job Counters (Ravi
|
||||||
|
Prakash via tgraves)
|
||||||
|
|
||||||
Release 0.23.6 - UNRELEASED
|
Release 0.23.6 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -71,10 +71,15 @@ public JobCounterInfo(AppContext ctx, Job job) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void getCounters(AppContext ctx, Job job) {
|
private void getCounters(AppContext ctx, Job job) {
|
||||||
total = new Counters();
|
|
||||||
if (job == null) {
|
if (job == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
total = job.getAllCounters();
|
||||||
|
boolean needTotalCounters = false;
|
||||||
|
if (total == null) {
|
||||||
|
total = new Counters();
|
||||||
|
needTotalCounters = true;
|
||||||
|
}
|
||||||
map = new Counters();
|
map = new Counters();
|
||||||
reduce = new Counters();
|
reduce = new Counters();
|
||||||
// Get all types of counters
|
// Get all types of counters
|
||||||
@ -84,7 +89,6 @@ private void getCounters(AppContext ctx, Job job) {
|
|||||||
if (counters == null) {
|
if (counters == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
total.incrAllCounters(counters);
|
|
||||||
switch (t.getType()) {
|
switch (t.getType()) {
|
||||||
case MAP:
|
case MAP:
|
||||||
map.incrAllCounters(counters);
|
map.incrAllCounters(counters);
|
||||||
@ -93,6 +97,9 @@ private void getCounters(AppContext ctx, Job job) {
|
|||||||
reduce.incrAllCounters(counters);
|
reduce.incrAllCounters(counters);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (needTotalCounters) {
|
||||||
|
total.incrAllCounters(counters);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user