Search in sources :

Example 1 with TaskReportPBImpl

use of org.apache.hadoop.mapreduce.v2.api.records.impl.pb.TaskReportPBImpl in project hadoop by apache.

the class TestTaskReport method testBuildImplicitRawCounters.

@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());
}
Also used : MRProtos(org.apache.hadoop.mapreduce.v2.proto.MRProtos) TaskReportPBImpl(org.apache.hadoop.mapreduce.v2.api.records.impl.pb.TaskReportPBImpl) Test(org.junit.Test)

Aggregations

TaskReportPBImpl (org.apache.hadoop.mapreduce.v2.api.records.impl.pb.TaskReportPBImpl)1 MRProtos (org.apache.hadoop.mapreduce.v2.proto.MRProtos)1 Test (org.junit.Test)1