public synchronized LinkedList<ReplicationMetric> getMetrics() {
    LinkedList<ReplicationMetric> metricList = new LinkedList<>();
    for (ReplicationMetric metric : metricMap.values()) {
      metricList.add(new ReplicationMetric(metric));
    }
    metricMap.clear();
    return metricList;
  }
MetricCollector.
In memory collection of metrics
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/metric/MetricCollector.java