You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/05/28 13:04:12 UTC

[GitHub] [iceberg] StefanXiepj commented on a change in pull request #2649: Hive: CachedClientPool connection leak

StefanXiepj commented on a change in pull request #2649:
URL: https://github.com/apache/iceberg/pull/2649#discussion_r641532345



##########
File path: hive-metastore/src/main/java/org/apache/iceberg/hive/CachedClientPool.java
##########
@@ -65,6 +65,8 @@ private synchronized void init() {
               .removalListener((key, value, cause) -> ((HiveClientPool) value).close())
               .build();
     }
+    // cleanup cache before jvm exit, avoid some clients may not be closed.
+    Runtime.getRuntime().addShutdownHook(new Thread(CachedClientPool::cleanupCache));

Review comment:
       If a large number of tasks exit, many connections may not be closed. But as you said, this is not a serious problem.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org