public static void wakeUp(Procedure<?> proc, MasterProcedureEnv env) {
    // should acquire procedure execution lock to make sure that the procedure executor has
    // finished putting this procedure to the WAITING_TIMEOUT state, otherwise there could be
    // race and cause unexpected result
    IdLock procLock = env.getMasterServices().getMasterProcedureExecutor().getProcExecutionLock();
    IdLock.Entry lockEntry;
    try {
      lockEntry = procLock.getLockEntry(proc.getProcId());
    } catch (IOException e) {
      LOG.error("Error while acquiring execution lock for procedure {}"
        + " when trying to wake it up, aborting...", proc, e);
      env.getMasterServices().abort("Can not acquire procedure execution lock", e);
      return;
    }
    try {
      env.getProcedureScheduler().addFront(proc);
    } finally {
      procLock.releaseLockEntry(lockEntry);
    }
  }
A helper class for switching procedure out(yielding) while it is doing some time consuming
operation, such as updating meta, where we can get a {@link CompletableFuture} about the
operation.
hbase-server/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureFutureUtil.java