@Test public void testBuildImplicitRawCounters() { TaskAttemptReportPBImpl report = new TaskAttemptReportPBImpl(); org.apache.hadoop.mapreduce.Counters rCounters = MockJobs.newCounters(); report.setRawCounters(rCounters); MRProtos.TaskAttemptReportProto protoVal = report.getProto(); Counters counters = report.getCounters(); assertTrue(protoVal.hasCounters()); }
private TaskAttemptReportPBImpl convertFromProtoFormat(TaskAttemptReportProto p) { return new TaskAttemptReportPBImpl(p); }
private TaskAttemptReportProto convertToProtoFormat(TaskAttemptReport t) { return ((TaskAttemptReportPBImpl)t).getProto(); }