private void snapshotSplitOrClosedRegions(MasterProcedureEnv env, List<RegionInfo> regions,
    String threadPoolName) throws IOException {
    ThreadPoolExecutor exec =
      SnapshotManifest.createExecutor(env.getMasterConfiguration(), threadPoolName);
    try {
      ModifyRegionUtils.editRegions(exec, regions, new ModifyRegionUtils.RegionEditTask() {
        @Override
        public void editRegion(final RegionInfo region) throws IOException {
          snapshotManifest.addRegion(CommonFSUtils.getTableDir(rootDir, snapshotTable), region);
          LOG.info("take snapshot region={}, table={}", region, snapshotTable);
        }
      });
    } finally {
      exec.shutdown();
    }
    status.setStatus("Completed referencing closed/split regions of table: " + snapshotTable);
  }
A procedure used to take snapshot on tables.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/SnapshotProcedure.java