private Flow confirm(MasterProcedureEnv env) {
    int unclosedCount = numberOfUnclosedRegions(env);
    if (unclosedCount > 0) {
      LOG.info(
        "There are still {} unclosed region(s) for closing regions of table {}"
          + " when executing {}, continue...",
        unclosedCount, tableName, getClass().getSimpleName());
      setNextState(getInitialState());
      return Flow.HAS_MORE_STATE;
    } else {
      return Flow.NO_MORE_STATE;
    }
  }
Base class for unassigning table regions.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractCloseTableRegionsProcedure.java