public synchronized void tearDown() {
    if (isInitialised) {
      try {
        this.executorService.shutdown();
      } finally {
        if (!this.executorService.isShutdown()) {
          this.executorService.shutdownNow();
        }
      }
      isInitialised = false;
    }
  }
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