static ThreadPoolExecutor getRegionOpenAndInitThreadPool(final Configuration conf,
    final String threadNamePrefix, int regionNumber) {
    int maxThreads =
      Math.min(regionNumber, conf.getInt("hbase.hregion.open.and.init.threads.max", 16));
    ThreadPoolExecutor regionOpenAndInitThreadPool = Threads.getBoundedCachedThreadPool(maxThreads,
      30L, TimeUnit.SECONDS, new ThreadFactoryBuilder().setNameFormat(threadNamePrefix + "-pool-%d")
        .setDaemon(true).setUncaughtExceptionHandler(Threads.LOGGING_EXCEPTION_HANDLER).build());
    return regionOpenAndInitThreadPool;
  }
Execute the task on the specified set of regions.
@param exec    Thread Pool Executor
@param regions {@link RegionInfo} that describes the regions to edit
@param task    {@link RegionFillTask} custom code to edit the region
hbase-server/src/main/java/org/apache/hadoop/hbase/util/ModifyRegionUtils.java