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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]