lcspinter opened a new pull request #2325:
URL: https://github.com/apache/iceberg/pull/2325


   HiveClientPool instances should be shared between HiveCatalogs if they are 
targeting the same HiveMetastore. 
   
   What I have done
   - Removed HiveCatalog global cache calls and marked 
HiveCatalogs#loadCatalog() as deprecated
   - Created HiveClientPool cache inside HiveCatalog
   - Created HiveClientPool cache cleaner thread which runs periodically 
(iceberg.hive.client-pool-cache-cleaner-interval), and removes HiveClientPool 
entries if they were not used for a certain amount of time 
(iceberg.hive.client-pool-cache-eviction-interval). This makes sure we are 
cleaning up every unused HiveClientPool connection. 
   - Removed the finalize() method implementation from the HiveCatalog. 
Previously the cleanup of the HiveClientPool connections was handled when the 
HiveCatalog was GC'd. 
   - Instead of passing the HiveClientPool to the HiveTableOperations, now the 
HiveCatalog is passed to fetch the HiveClientPool instance from the cache.
   - HiveCatalog is not an instance of Closable anymore. 
   - Created unit test to validate the cleaner thread.


----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to