@Test public void testBuildImplicitRawCounters() { // Create basic class TaskReportPBImpl report = new TaskReportPBImpl(); org.apache.hadoop.mapreduce.Counters rCounters = MockJobs.newCounters(); // Set raw counters report.setRawCounters(rCounters); // Verify getProto method implicitly converts/sets real counters MRProtos.TaskReportProto protoVal = report.getProto(); assertTrue(protoVal.hasCounters()); }
private TaskReportPBImpl convertFromProtoFormat(TaskReportProto p) { return new TaskReportPBImpl(p); }
private TaskReportProto convertToProtoFormat(TaskReport t) { return ((TaskReportPBImpl)t).getProto(); }