protected static long updateCycleDurationMetric(String metric, long startedAt) {
    if (startedAt >= 0) {
      long elapsed = System.currentTimeMillis() - startedAt;
      LOG.debug("Updating {} metric to {}", metric, elapsed);
      Metrics.getOrCreateGauge(metric)
          .set((int) elapsed);
      return elapsed;
    }
    return 0;
  }
Compactor threads that runs in the metastore. It uses a {@link TxnStore}
to access the internal database.
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/MetaStoreCompactorThread.java