@SuppressWarnings("deprecation")
  public static RSGroupInfo fillTables(RSGroupInfo rsGroupInfo, Collection<TableDescriptor> tds) {
    RSGroupInfo newRsGroupInfo = new RSGroupInfo(rsGroupInfo);
    Predicate<TableDescriptor> filter;
    if (rsGroupInfo.getName().equals(RSGroupInfo.DEFAULT_GROUP)) {
      filter = td -> {
        Optional<String> optGroupName = td.getRegionServerGroup();
        return !optGroupName.isPresent() || optGroupName.get().equals(RSGroupInfo.DEFAULT_GROUP);
      };
    } else {
      filter = td -> {
        Optional<String> optGroupName = td.getRegionServerGroup();
        return optGroupName.isPresent() && optGroupName.get().equals(newRsGroupInfo.getName());
      };
    }
    tds.stream().filter(filter).map(TableDescriptor::getTableName)
      .forEach(newRsGroupInfo::addTable);
    return newRsGroupInfo;
  }
Fill the tables field for {@link RSGroupInfo}, for backward compatibility.
hbase-server/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupUtil.java