xinglin commented on code in PR #5803:
URL: https://github.com/apache/hadoop/pull/5803#discussion_r1258986732


##########
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProvider.java:
##########
@@ -648,6 +645,7 @@ public synchronized void close() throws IOException {
       }
     }
     failoverProxy.close();
+    nnProbingThreadPool.shutdown();

Review Comment:
   We switched to use BlockingThreadPoolExecutorService, which set 
`allowCoreThreadTimeout` to true. When the main thread exits, there won't be 
new tasks submitted to the executorService. Then all threads, including the 
core threads will be idle and they will all be shut down after idle for a 
certain time, due to the allowCoreThreadTimeout property to be true. We are not 
waiting for GC to call the close() to shut down the threads. All threads in the 
executorService will be shutdown after idle for 10 seconds.
   
   After all threads from the executorService are shutdown, and there is no 
active thread, JVM will be shutdown.



-- 
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