public void stop() throws InterruptedException {
      LOG.info("Shutting down compaction txn heartbeater instance.");
      heartbeatExecutor.shutdownNow();
      if (!heartbeatExecutor.awaitTermination(5, TimeUnit.SECONDS)) {
        LOG.warn("Heartbeating for transaction {} did not stop in 5 seconds, do not wait any longer.", txnId);
        return;
      }
      LOG.info("Compaction txn heartbeater instance is successfully stopped.");
    }
Shuts down the service, by closing its underlying resources. Be aware that after shutdown this service is no
longer usable, there is no way to re-initialize it.
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactionHeartbeatService.java