public static void stopThreadPool(ExecutorService pool, ThreadName poolName) {
    if (pool != null) {
      pool.shutdownNow();
      try {
        if (!pool.awaitTermination(60, TimeUnit.SECONDS)) {
          logger.warn("Waiting {} to be terminated is timeout", poolName.getName());
        }
      } catch (InterruptedException e) {
        logger.warn("{} still doesn't exit after 60s", poolName.getName());
        Thread.currentThread().interrupt();
        throw new StorageEngineFailureException(
            String.format("StorageEngine failed to stop because of %s.", poolName.getName()), e);
      }
    }
  }
the utils for managing thread or thread pool
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ThreadUtils.java