private Stream<RegionInfo> getDefaultRegionReplica(MasterProcedureEnv env) {
    return env.getAssignmentManager().getTableRegions(snapshotTable, false).stream()
      .filter(r -> RegionReplicaUtil.isDefaultReplica(r));
  }
A procedure used to take snapshot on tables.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/SnapshotProcedure.java