@Override
  public void run() {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Cleaning up materialization rebuild locks");
    }

    TxnStore.MutexAPI mutex = shouldUseMutex ? txnHandler.getMutexAPI() : new NoMutex();
    try (AutoCloseable closeable = mutex.acquireLock(TxnStore.MUTEX_KEY.MaterializationRebuild.name())) {
      ValidTxnList validTxnList = TxnCommonUtils.createValidReadTxnList(txnHandler.getOpenTxns(), 0);
      long removedCnt = txnHandler.cleanupMaterializationRebuildLocks(validTxnList,
          MetastoreConf.getTimeVar(conf, MetastoreConf.ConfVars.TXN_TIMEOUT, TimeUnit.MILLISECONDS));
      if (removedCnt > 0) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Number of materialization locks deleted: " + removedCnt);
        }
      }
    } catch (Throwable t) {
      LOG.error("Unexpected error in thread: {}, message: {}", Thread.currentThread().getName(), t.getMessage(), t);
    }
  }
Cleaner for the {@link MaterializationsRebuildLockHandler}. It removes outdated locks
in the intervals specified by the input property.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MaterializationsRebuildLockCleanerTask.java