public static void checkGroupNotEmpty(RSGroupInfo rsGroupInfo, Supplier<String> forWhom)
    throws ConstraintException {
    if (rsGroupInfo == null || rsGroupInfo.getName().equals(RSGroupInfo.DEFAULT_GROUP)) {
      // we do not have a rs group config or we explicitly set the rs group to default, then no need
      // to check.
      return;
    }
    if (rsGroupInfo.getServers().isEmpty()) {
      throw new ConstraintException(
        "No servers in the rsgroup " + rsGroupInfo.getName() + " for " + forWhom.get());
    }
  }
Do not allow creating new tables/namespaces which has an empty rs group, expect the default rs
group. Notice that we do not check for online servers, as this is not stable because region
servers can die at any time.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureUtil.java