deniskuzZ commented on code in PR #6499:
URL: https://github.com/apache/hive/pull/6499#discussion_r3303247226


##########
standalone-metastore/metastore-client/src/main/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java:
##########
@@ -123,13 +114,14 @@ public static IMetaStoreClient getProxy(Configuration 
hiveConf, HiveMetaHookLoad
   public static IMetaStoreClient getProxy(Configuration hiveConf, 
HiveMetaHookLoader hookLoader,
       Map<String, Long> metaCallTimeMap, String mscClassName, boolean 
allowEmbedded)
           throws MetaException {
-
-    return getProxy(hiveConf,
-        new Class[] {Configuration.class, HiveMetaHookLoader.class, 
Boolean.class},
-        new Object[] {hiveConf, hookLoader, allowEmbedded},
-        metaCallTimeMap,
-        mscClassName
-    );
+    String origClientImpl = MetastoreConf.getVar(hiveConf, 
ConfVars.METASTORE_CLIENT_IMPL);
+    try {
+      MetastoreConf.setVar(hiveConf, ConfVars.METASTORE_CLIENT_IMPL, 
mscClassName);
+      return new HiveMetaStoreClientBuilder(hiveConf, allowEmbedded)
+          .withHooks(hookLoader).withRetry(metaCallTimeMap).build();
+    } finally {
+      MetastoreConf.setVar(hiveConf, ConfVars.METASTORE_CLIENT_IMPL, 
origClientImpl);

Review Comment:
   same, this looks like a hack



-- 
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