@Override
  @RetrySemantics.Idempotent
  public void revokeTimedoutWorkers(long timeout) throws MetaException {
    long latestValidStart = getDbTime().getTime() - timeout;
    jdbcResource.execute(
        "UPDATE \"COMPACTION_QUEUE\" SET \"CQ_WORKER_ID\" = NULL, \"CQ_START\" = NULL, " +
            "\"CQ_STATE\" = :initiatedState WHERE \"CQ_STATE\" = :workingState AND \"CQ_START\" < :timeout",
        new MapSqlParameterSource()
            .addValue("initiatedState", Character.toString(INITIATED_STATE), Types.CHAR)
            .addValue("workingState", Character.toString(WORKING_STATE), Types.CHAR)
            .addValue("timeout", latestValidStart),
        null);
  }
This call will return all compaction queue
entries assigned to a worker but over the timeout back to the initiated state.
This should be called by the initiator on start up and occasionally when running to clean up
after dead threads.  At start up {@link #revokeFromLocalWorkers(String)} should be called
first.
@param timeout number of milliseconds since start time that should elapse before a worker is
               declared dead.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java