private long checkVertexSuffixAndGetValue(final List<String> vertexNames, final String counterName,
    final TezCounter tezCounter) {
    for (String vertexName : vertexNames) {
      if (tezCounter.getName().equalsIgnoreCase(counterName + "_" + vertexName)) {
        return tezCounter.getValue();
      }
    }
    return 0;
  }
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