@Override
  public void run() {
    TxnStore.MutexAPI mutex = shouldUseMutex ? txnHandler.getMutexAPI() : new NoMutex();
    try (AutoCloseable closeable = mutex.acquireLock(TxnStore.MUTEX_KEY.HouseKeeper.name())) {
      LOG.info("Starting to run {}", serviceName);
      long start = System.currentTimeMillis();
      cleanTheHouse();
      LOG.debug("Total time {} took: {} seconds.", serviceName, elapsedSince(start));
    } catch (Exception e) {
      LOG.error("Unexpected exception in thread: {}, message: {}", Thread.currentThread().getName(), e.getMessage(), e);
    }
  }
Performs background tasks for Transaction management in Hive.
Runs inside Hive Metastore Service.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/service/AcidHouseKeeperService.java