@Override
  protected int numberOfUnclosedRegions(MasterProcedureEnv env) {
    return env.getAssignmentManager().numberOfUnclosedExcessRegionReplicas(tableName,
      newReplicaCount);
  }
Procedure for close excess region replicas.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloseExcessRegionReplicasProcedure.java