code: private void shutdownBatchPool() {
      if (this.cleanupPool && this.batchPool != null && !this.batchPool.isShutdown()) {
        this.batchPool.shutdown();
        try {
          if (!this.batchPool.awaitTermination(10, TimeUnit.SECONDS)) {
            this.batchPool.shutdownNow();
          }
        } catch (InterruptedException e) {
          Thread.currentThread().interrupt();
          this.batchPool.shutdownNow();
        }
      }
    }
docs: Copied from org.apache.hadoop.hbase.client.HConnectionManager#shutdownBatchPool()