Github user liufengdb commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20025#discussion_r162426604
  
    --- Diff: 
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/SessionManager.java
 ---
    @@ -79,35 +75,19 @@ public synchronized void init(HiveConf hiveConf) {
           initOperationLogRootDir();
         }
         createBackgroundOperationPool();
    -    addService(operationManager);
    -    super.init(hiveConf);
    -  }
    -
    -  private void createBackgroundOperationPool() {
    -    int poolSize = 
hiveConf.getIntVar(ConfVars.HIVE_SERVER2_ASYNC_EXEC_THREADS);
    -    LOG.info("HiveServer2: Background operation thread pool size: " + 
poolSize);
    -    int poolQueueSize = 
hiveConf.getIntVar(ConfVars.HIVE_SERVER2_ASYNC_EXEC_WAIT_QUEUE_SIZE);
    -    LOG.info("HiveServer2: Background operation thread wait queue size: " 
+ poolQueueSize);
    -    long keepAliveTime = HiveConf.getTimeVar(
    -        hiveConf, ConfVars.HIVE_SERVER2_ASYNC_EXEC_KEEPALIVE_TIME, 
TimeUnit.SECONDS);
    -    LOG.info(
    -        "HiveServer2: Background operation thread keepalive time: " + 
keepAliveTime + " seconds");
    -
    -    // Create a thread pool with #poolSize threads
    -    // Threads terminate when they are idle for more than the keepAliveTime
    -    // A bounded blocking queue is used to queue incoming operations, if 
#operations > poolSize
    -    String threadPoolName = "HiveServer2-Background-Pool";
    -    backgroundOperationPool = new ThreadPoolExecutor(poolSize, poolSize,
    -        keepAliveTime, TimeUnit.SECONDS, new 
LinkedBlockingQueue<Runnable>(poolQueueSize),
    -        new ThreadFactoryWithGarbageCleanup(threadPoolName));
    -    backgroundOperationPool.allowCoreThreadTimeOut(true);
    -
    --- End diff --
    
     I think we can keep this file unchanged. Looks like the hive thread pool 
is more flexible than the spark one. 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to