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


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/CachedClientPool.java:
##########
@@ -56,9 +57,16 @@ public class CachedClientPool implements 
ClientPool<IMetaStoreClient, TException
     init();
   }
 
+  @VisibleForTesting
+  static String cacheKey(Configuration conf) {
+    return String.format(
+        "%s:%s",
+        conf.get(HiveConf.ConfVars.METASTOREURIS.varname, ""), 
conf.get(CATALOG_DEFAULT, ""));

Review Comment:
   I do not know of a situation where someone is currently restricted by this 
configuration problem, but I feel that the static list would be a small 
additional complexity which would show a clear path forward for anyone bumping 
into the situation later, even if we are not here to review it.
   
   Alternatively:
   - New configuration: `cacheKey`
   - If the `cacheKey` is provided use it for cache
   - If the `cacheKey` is not provided then use the `uri`
   
   This would solve all of our problems and it would provide the maximum 
flexibility for the user. The question is security, but I think that could be 
solved as well.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to