Search in sources :

Example 11 with CounterGroup

use of org.apache.hadoop.mapreduce.v2.api.records.CounterGroup in project hadoop by apache.

the class TestClientServiceDelegate method getCountersResponseFromHistoryServer.

private GetCountersResponse getCountersResponseFromHistoryServer() {
    GetCountersResponse countersResponse = Records.newRecord(GetCountersResponse.class);
    Counter counter = Records.newRecord(Counter.class);
    CounterGroup counterGroup = Records.newRecord(CounterGroup.class);
    Counters counters = Records.newRecord(Counters.class);
    counter.setDisplayName("dummyCounter");
    counter.setName("dummyCounter");
    counter.setValue(1001);
    counterGroup.setName("dummyCounters");
    counterGroup.setDisplayName("dummyCounters");
    counterGroup.setCounter("dummyCounter", counter);
    counters.setCounterGroup("dummyCounters", counterGroup);
    countersResponse.setCounters(counters);
    return countersResponse;
}
Also used : GetCountersResponse(org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetCountersResponse) Counter(org.apache.hadoop.mapreduce.v2.api.records.Counter) CounterGroup(org.apache.hadoop.mapreduce.v2.api.records.CounterGroup) Counters(org.apache.hadoop.mapreduce.v2.api.records.Counters)

Aggregations

CounterGroup (org.apache.hadoop.mapreduce.v2.api.records.CounterGroup)9 Counters (org.apache.hadoop.mapreduce.v2.api.records.Counters)6 Counter (org.apache.hadoop.mapreduce.v2.api.records.Counter)5 Counters (org.apache.hadoop.mapreduce.Counters)2 GetCountersResponse (org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetCountersResponse)2 TaskAttemptId (org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId)2 TaskAttempt (org.apache.hadoop.mapreduce.v2.app.job.TaskAttempt)2 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1 Counter (org.apache.hadoop.mapreduce.Counter)1 CounterGroup (org.apache.hadoop.mapreduce.CounterGroup)1 GetCountersRequest (org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetCountersRequest)1 GetTaskReportResponse (org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetTaskReportResponse)1 JobId (org.apache.hadoop.mapreduce.v2.api.records.JobId)1 TaskId (org.apache.hadoop.mapreduce.v2.api.records.TaskId)1 TaskReport (org.apache.hadoop.mapreduce.v2.api.records.TaskReport)1 Task (org.apache.hadoop.mapreduce.v2.app.job.Task)1 CountersProtoOrBuilder (org.apache.hadoop.mapreduce.v2.proto.MRProtos.CountersProtoOrBuilder)1 StringCounterGroupMapProto (org.apache.hadoop.mapreduce.v2.proto.MRProtos.StringCounterGroupMapProto)1 YarnRuntimeException (org.apache.hadoop.yarn.exceptions.YarnRuntimeException)1