public static MetricSink getInstance() {
    if (instance == null) {
      synchronized (MetricSink.class) {
        if (instance == null) {
          instance = new MetricSink();
        }
      }
    }
    return instance;
  }
MetricSink.
Scheduled thread to poll from Metric Collector and persists to DB
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/metric/MetricSink.java