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 2022/07/29 19:07:25 UTC

[GitHub] [iceberg] RussellSpitzer commented on a diff in pull request #5378: Hive: More distinctive cached client pool key to avoid conflict

RussellSpitzer commented on code in PR #5378:
URL: https://github.com/apache/iceberg/pull/5378#discussion_r933549910


##########
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:
   I would prefer it because what about my two metastores
   
   `host1:9083 with default catalog ""`
   And my metastore
   `host1:90 with default catalog "83"`
   
   On that note are you allowed to do a metastore uri without a port?



-- 
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-unsubscribe@iceberg.apache.org

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