private ExecutorService createThreadPool() {
    int maxThreads = 256;
    int coreThreads = 128;

    long keepAliveTime = 60;
    BlockingQueue<Runnable> workQueue = new LinkedBlockingQueue<Runnable>(
      maxThreads * HConstants.DEFAULT_HBASE_CLIENT_MAX_TOTAL_TASKS);

    ThreadPoolExecutor tpe =
      new ThreadPoolExecutor(coreThreads, maxThreads, keepAliveTime, TimeUnit.SECONDS, workQueue,
        new ThreadFactoryBuilder().setNameFormat(toString() + "-shared-pool-%d").setDaemon(true)
          .setUncaughtExceptionHandler(Threads.LOGGING_EXCEPTION_HANDLER).build());
    tpe.allowCoreThreadTimeOut(true);
    return tpe;
  }
A test tool that uses multiple threads to read and write multifamily rows into a table, verifying
that reads never see partially-complete writes
hbase-server/src/test/java/org/apache/hadoop/hbase/AcidGuaranteesTestTool.java