public static void archiveRegions(Configuration conf, FileSystem fs, Path rootDir, Path tableDir,
    List<Path> regionDirList) throws IOException {
    List<Future<Void>> futures = new ArrayList<>(regionDirList.size());
    for (Path regionDir : regionDirList) {
      Future<Void> future = getArchiveExecutor(conf).submit(() -> {
        archiveRegion(conf, fs, rootDir, tableDir, regionDir);
        return null;
      });
      futures.add(future);
    }
    try {
      for (Future<Void> future : futures) {
        future.get();
      }
    } catch (InterruptedException e) {
      throw new InterruptedIOException(e.getMessage());
    } catch (ExecutionException e) {
      throw new IOException(e.getCause());
    }
  }
Archive the specified regions in parallel.
@param conf          the configuration to use
@param fs            {@link FileSystem} from which to remove the region
@param rootDir       {@link Path} to the root directory where hbase files are stored (for
                     building the archive path)
@param tableDir      {@link Path} to where the table is being stored (for building the archive
                     path)
@param regionDirList {@link Path} to where regions are being stored (for building the archive
                     path)
@throws IOException if the request cannot be completed
hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java