szehon-ho commented on code in PR #5378:
URL: https://github.com/apache/iceberg/pull/5378#discussion_r933539862


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/CachedClientPool.java:
##########
@@ -33,16 +33,18 @@
 
 public class CachedClientPool implements ClientPool<IMetaStoreClient, 
TException> {
 
+  @VisibleForTesting static final String CATALOG_DEFAULT = 
"metastore.catalog.default";
   private static Cache<String, HiveClientPool> clientPoolCache;
 
   private final Configuration conf;
-  private final String metastoreUri;
+  private final String clientPoolKey;
   private final int clientPoolSize;
   private final long evictionInterval;
 
   CachedClientPool(Configuration conf, Map<String, String> properties) {
     this.conf = conf;
-    this.metastoreUri = conf.get(HiveConf.ConfVars.METASTOREURIS.varname, "");
+    this.clientPoolKey =
+        conf.get(HiveConf.ConfVars.METASTOREURIS.varname, "") + 
conf.get(CATALOG_DEFAULT, "");

Review Comment:
   Slightly prefer to have a separate method, so its clearer where to add if 
there are more client settings that need to be on different pools:
   
   ```
     String cacheKey(Configuration conf) {
       return Joiner.on(":").join(
           conf.get(HiveConf.ConfVars.METASTOREURIS.varname, ""),
           conf.get(CATALOG_DEFAULT))
     }
   ```
   
   Also preferred a separator, to make debugger easier.



-- 
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: issues-unsubscr...@iceberg.apache.org

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