Search in sources :

Example 1 with CounterGroupProtoOrBuilder

use of org.apache.hadoop.mapreduce.v2.proto.MRProtos.CounterGroupProtoOrBuilder in project hadoop by apache.

the class CounterGroupPBImpl method initCounters.

private void initCounters() {
    if (this.counters != null) {
        return;
    }
    CounterGroupProtoOrBuilder p = viaProto ? proto : builder;
    List<StringCounterMapProto> list = p.getCountersList();
    this.counters = new HashMap<String, Counter>();
    for (StringCounterMapProto c : list) {
        this.counters.put(c.getKey(), convertFromProtoFormat(c.getValue()));
    }
}
Also used : StringCounterMapProto(org.apache.hadoop.mapreduce.v2.proto.MRProtos.StringCounterMapProto) Counter(org.apache.hadoop.mapreduce.v2.api.records.Counter) CounterGroupProtoOrBuilder(org.apache.hadoop.mapreduce.v2.proto.MRProtos.CounterGroupProtoOrBuilder)

Aggregations

Counter (org.apache.hadoop.mapreduce.v2.api.records.Counter)1 CounterGroupProtoOrBuilder (org.apache.hadoop.mapreduce.v2.proto.MRProtos.CounterGroupProtoOrBuilder)1 StringCounterMapProto (org.apache.hadoop.mapreduce.v2.proto.MRProtos.StringCounterMapProto)1