public static MetricCollector getInstance() {
    if (instance == null) {
      synchronized (MetricCollector.class) {
        if (instance == null) {
          instance = new MetricCollector();
        }
      }
    }
    return instance;
  }
MetricCollector.
In memory collection of metrics
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/metric/MetricCollector.java