public void processOfflineRegions() {
    TransitRegionStateProcedure[] procs =
      regionStates.getRegionStateNodes().stream().filter(rsn -> rsn.isInState(State.OFFLINE))
        .filter(rsn -> isTableEnabled(rsn.getRegionInfo().getTable())).map(rsn -> {
          rsn.lock();
          try {
            if (rsn.getProcedure() != null) {
              return null;
            } else {
              return rsn.setProcedure(TransitRegionStateProcedure.assign(getProcedureEnvironment(),
                rsn.getRegionInfo(), null));
            }
          } finally {
            rsn.unlock();
          }
        }).filter(p -> p != null).toArray(TransitRegionStateProcedure[]::new);
    if (procs.length > 0) {
      master.getMasterProcedureExecutor().submitProcedures(procs);
    }
  }
Create assign procedure for offline regions. Just follow the old
processofflineServersWithOnlineRegions method. Since now we do not need to deal with dead
server any more, we only deal with the regions in OFFLINE state in this method. And this is a
bit strange, that for new regions, we will add it in CLOSED state instead of OFFLINE state, and
usually there will be a procedure to track them. The processofflineServersWithOnlineRegions is
a legacy from long ago, as things are going really different now, maybe we do not need this
method any more. Need to revisit later.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java