private void clearMetrics() {
    runningTasksCount.setValue(0);
    pendingTasksCount.setValue(0);
    taskBacklogRatio.setValue(0.0);
    Arrays.stream(taskBacklogRatioDurations).forEach(m -> m.timeSet = 0);
  }
TezSessionPoolManagerMetrics collects, aggregates and exposes data from Tez sessions to Hive's own MetricsFactory.
This is independent of the Tez DagClient which is active only while running DAGs.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPoolManagerMetrics.java