private void aggregateCountersSum(final Map<String, Long> updatedCounters, final List<String> vertexNames,
    final String prefixRemovedCounterName, final String desiredCounter, final TezCounter tezCounter) {
    long counterValue = checkVertexSuffixAndGetValue(vertexNames, prefixRemovedCounterName, tezCounter);
    long currentTotal = 0;
    if (updatedCounters.containsKey(desiredCounter)) {
      currentTotal = updatedCounters.get(desiredCounter);
    }
    long newTotal = currentTotal + counterValue;
    updatedCounters.put(desiredCounter, newTotal);
  }
TezJobMonitor keeps track of a tez job while it's being executed. It will
print status to the console and retrieve final status of the job after
completion.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/monitoring/TezJobMonitor.java