deniskuzZ commented on code in PR #4322:
URL: https://github.com/apache/hive/pull/4322#discussion_r1225342260
##########
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:
@dengzhhu653 should it be like
````
ThreadPoolExecutor executorService = new
ThreadPoolExecutor(minWorkerThreads,
maxWorkerThreads,workerKeepAliveTime, TimeUnit.SECONDS,
new SynchronousQueue<>(), new
ThreadFactoryWithGarbageCleanup(threadPoolName)){
@Override
public void setThreadFactory(ThreadFactory threadFactory) {
if (getThreadFactory() != null) {
LOG.warn("Ignore setting the thread factory as the pool has
already provided his own: {}", getThreadFactory());
} else {
super.setThreadFactory(threadFactory);
}
}
};
````
--
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]