groupBuilder.setDisplayName(counterGroup.getDisplayName());
Iterator<TezCounter> counterIterator = counterGroup.iterator();
int counterIndex = 0;
while (counterIterator.hasNext()) {
TezCounter counter = counterIterator.next();
TezCounterProto tezCounterProto = TezCounterProto.newBuilder()
.setName(counter.getName())
.setDisplayName(counter.getDisplayName())
.setValue(counter.getValue())
.build();
groupBuilder.addCounters(counterIndex, tezCounterProto);