public void stop() {
    shouldRun = false;
    if (isStarted()) {
      monitorThread.interrupt();
      try {
        monitorThread.join();
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
      }
    }
  }
log INFO if we detect a pause longer than this threshold
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/metrics/JvmPauseMonitor.java