@@ -89,7 +89,7 @@ public class JobBuilder {
89
89
private Map <ParsedHost , ParsedHost > allHosts =
90
90
new HashMap <ParsedHost , ParsedHost >();
91
91
92
- private org .apache .hadoop .mapreduce .jobhistory .JhCounters EMPTY_COUNTERS =
92
+ private final static org .apache .hadoop .mapreduce .jobhistory .JhCounters EMPTY_COUNTERS =
93
93
new org .apache .hadoop .mapreduce .jobhistory .JhCounters ();
94
94
95
95
/**
@@ -460,7 +460,7 @@ private void processTaskFinishedEvent(TaskFinishedEvent event) {
460
460
}
461
461
task .setFinishTime (event .getFinishTime ());
462
462
task .setTaskStatus (getPre21Value (event .getTaskStatus ()));
463
- task .incorporateCounters (((TaskFinished ) event .getDatum ()).counters );
463
+ task .incorporateCounters (((TaskFinished ) event .getDatum ()).getCounters () );
464
464
}
465
465
466
466
private void processTaskFailedEvent (TaskFailedEvent event ) {
@@ -472,7 +472,7 @@ private void processTaskFailedEvent(TaskFailedEvent event) {
472
472
task .setFinishTime (event .getFinishTime ());
473
473
task .setTaskStatus (getPre21Value (event .getTaskStatus ()));
474
474
TaskFailed t = (TaskFailed )(event .getDatum ());
475
- task .putDiagnosticInfo (t .error .toString ());
475
+ task .putDiagnosticInfo (t .getError () .toString ());
476
476
// killed task wouldn't have failed attempt.
477
477
if (t .getFailedDueToAttempt () != null ) {
478
478
task .putFailedDueToAttemptId (t .getFailedDueToAttempt ().toString ());
@@ -542,7 +542,7 @@ private void processTaskAttemptFinishedEvent(TaskAttemptFinishedEvent event) {
542
542
}
543
543
attempt .setFinishTime (event .getFinishTime ());
544
544
attempt
545
- .incorporateCounters (((TaskAttemptFinished ) event .getDatum ()).counters );
545
+ .incorporateCounters (((TaskAttemptFinished ) event .getDatum ()).getCounters () );
546
546
}
547
547
548
548
private void processReduceAttemptFinishedEvent (
@@ -568,7 +568,7 @@ private void processReduceAttemptFinishedEvent(
568
568
attempt .setShuffleFinished (event .getShuffleFinishTime ());
569
569
attempt .setSortFinished (event .getSortFinishTime ());
570
570
attempt
571
- .incorporateCounters (((ReduceAttemptFinished ) event .getDatum ()).counters );
571
+ .incorporateCounters (((ReduceAttemptFinished ) event .getDatum ()).getCounters () );
572
572
attempt .arraySetClockSplits (event .getClockSplits ());
573
573
attempt .arraySetCpuUsages (event .getCpuUsages ());
574
574
attempt .arraySetVMemKbytes (event .getVMemKbytes ());
@@ -596,7 +596,7 @@ private void processMapAttemptFinishedEvent(MapAttemptFinishedEvent event) {
596
596
// is redundant, but making this will add future-proofing.
597
597
attempt .setFinishTime (event .getFinishTime ());
598
598
attempt
599
- .incorporateCounters (((MapAttemptFinished ) event .getDatum ()).counters );
599
+ .incorporateCounters (((MapAttemptFinished ) event .getDatum ()).getCounters () );
600
600
attempt .arraySetClockSplits (event .getClockSplits ());
601
601
attempt .arraySetCpuUsages (event .getCpuUsages ());
602
602
attempt .arraySetVMemKbytes (event .getVMemKbytes ());
@@ -661,11 +661,11 @@ private void processJobFinishedEvent(JobFinishedEvent event) {
661
661
662
662
JobFinished job = (JobFinished )event .getDatum ();
663
663
Map <String , Long > countersMap =
664
- JobHistoryUtils .extractCounters (job .totalCounters );
664
+ JobHistoryUtils .extractCounters (job .getTotalCounters () );
665
665
result .putTotalCounters (countersMap );
666
- countersMap = JobHistoryUtils .extractCounters (job .mapCounters );
666
+ countersMap = JobHistoryUtils .extractCounters (job .getMapCounters () );
667
667
result .putMapCounters (countersMap );
668
- countersMap = JobHistoryUtils .extractCounters (job .reduceCounters );
668
+ countersMap = JobHistoryUtils .extractCounters (job .getReduceCounters () );
669
669
result .putReduceCounters (countersMap );
670
670
}
671
671
0 commit comments