public void initialize() throws IOException {
    LOG.info("Start to scan the hbase:meta for the current region assignment " + "snappshot");
    // Scan hbase:meta to pick up user regions
    try (Table metaTable = connection.getTable(TableName.META_TABLE_NAME);
      ResultScanner scanner = metaTable.getScanner(HConstants.CATALOG_FAMILY)) {
      for (;;) {
        Result result = scanner.next();
        if (result == null) {
          break;
        }
        try {
          processMetaRecord(result);
        } catch (RuntimeException e) {
          LOG.error("Catch remote exception " + e.getMessage() + " when processing" + result);
          throw e;
        }
      }
    }
    LOG.info("Finished to scan the hbase:meta for the current region assignment" + "snapshot");
  }
Initialize the region assignment snapshot by scanning the hbase:meta table
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/SnapshotOfRegionAssignmentFromMeta.java