use of org.apache.tez.dag.api.records.DAGProtos.TezCounterGroupProto in project tez by apache.
the class DagTypeConverters method convertTezCountersFromProto.
public static TezCounters convertTezCountersFromProto(TezCountersProto proto) {
TezCounters counters = new TezCounters();
for (TezCounterGroupProto counterGroupProto : proto.getCounterGroupsList()) {
CounterGroup group = counters.addGroup(counterGroupProto.getName(), counterGroupProto.getDisplayName());
for (TezCounterProto counterProto : counterGroupProto.getCountersList()) {
TezCounter counter = group.findCounter(counterProto.getName(), counterProto.getDisplayName());
counter.setValue(counterProto.getValue());
}
}
return counters;
}
Aggregations