dengzhhu653 commented on code in PR #4322:
URL: https://github.com/apache/hive/pull/4322#discussion_r1193801855


##########
service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java:
##########
@@ -94,7 +95,13 @@ protected void initServer() {
       String threadPoolName = "HiveServer2-HttpHandler-Pool";
       ThreadPoolExecutor executorService = new 
ThreadPoolExecutor(minWorkerThreads,
           maxWorkerThreads,workerKeepAliveTime, TimeUnit.SECONDS,
-          new SynchronousQueue<Runnable>(), new 
ThreadFactoryWithGarbageCleanup(threadPoolName));
+          new SynchronousQueue<Runnable>(), new 
ThreadFactoryWithGarbageCleanup(threadPoolName)) {
+        @Override
+        public void setThreadFactory(ThreadFactory threadFactory) {

Review Comment:
   Thanks for the comments. 
   In Jetty, the `ExecutorThreadPool` will override the `ThreadPoolExecutor`'s 
ThreadFactory:
   ```
    ((ThreadPoolExecutor)_executor).setThreadFactory(this::newThread);
   ```
   In our case, the `_executor` has already provided the ThreadFactory, so as a 
workaround, `_executor` needs to make the `setThreadFactory` empty, e.g, make 
this call take no effect.
   
   Perhaps we need to print some warn logs to indicate what's happening in this 
overriding method.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to