public class AvroUtils {
public static TezCounters toAvro(
org.apache.tez.common.counters.TezCounters counters) {
TezCounters result = new TezCounters();
result.groups = new ArrayList<TezCounterGroup>(0);
if (counters == null) return result;
for (CounterGroup group : counters) {
TezCounterGroup g = new TezCounterGroup();
g.name = new Utf8(group.getName());