public TransitRegionStateProcedure[] createUnassignProceduresForDisabling(TableName tableName) {
    return regionStates.getTableRegionStateNodes(tableName).stream()
      .map(this::forceCreateUnssignProcedure).filter(p -> p != null)
      .toArray(TransitRegionStateProcedure[]::new);
  }
Called by DisableTableProcedure to unassign all the regions for a table.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java