public long getCounter(String groupName, String counterName) {
    CounterGroup group = counters == null ? null : counters.getGroup(groupName);
    if (group == null) {
      return 0;
    }
    return group.findCounter(counterName, true).getValue();
  }
TezRuntimeContext is a class used by mainly TezTask to store runtime information.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezRuntimeContext.java