private static synchronized ThreadPoolExecutor getArchiveExecutor(final Configuration conf) {
    if (archiveExecutor == null) {
      int maxThreads = conf.getInt("hbase.hfilearchiver.thread.pool.max", 8);
      archiveExecutor = Threads.getBoundedCachedThreadPool(maxThreads, 30L, TimeUnit.SECONDS,
        getThreadFactory("HFileArchiver"));

      // Shutdown this ThreadPool in a shutdown hook
      Runtime.getRuntime().addShutdownHook(new Thread(() -> archiveExecutor.shutdown()));
    }
    return archiveExecutor;
  }
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