okumin commented on code in PR #4444:
URL: https://github.com/apache/hive/pull/4444#discussion_r1239647627


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -5700,11 +5701,26 @@ public HiveMetaHook getHook(
       }
     };
 
-    if (conf.getBoolVar(ConfVars.METASTORE_FASTPATH)) {
-      return new SessionHiveMetaStoreClient(conf, hookLoader, allowEmbedded);
-    } else {
-      return RetryingMetaStoreClient.getProxy(conf, hookLoader, 
metaCallTimeMap,
-          SessionHiveMetaStoreClient.class.getName(), allowEmbedded);
+    return createMetaStoreClientFactory(conf)
+        .createMetaStoreClient(conf, hookLoader, allowEmbedded, 
metaCallTimeMap);
+  }
+
+  private static HiveMetaStoreClientFactory 
createMetaStoreClientFactory(HiveConf conf) throws
+          MetaException {
+    String metaStoreClientFactoryClassName = MetastoreConf.getVar(conf,
+        MetastoreConf.ConfVars.METASTORE_CLIENT_FACTORY_CLASS);

Review Comment:
   I have two thoughts.
   - I think we have to explicitly disable `hive.metastore.fastpath` when 
configuring `metastore.client.class` since 
[RetryingMetaStoreClient](https://github.com/apache/hive/blob/master/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java)
 is tightly coupled with `SessionHiveMetaStoreClient`
       - It could be acceptable if we change [the description of 
hive.metastore.fastpath](https://github.com/apache/hive/blob/rel/release-4.0.0-alpha-2/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java#L937-L940)
   - I guess people in the world already depend on 
`hive.metastore.client.factory.class` since we have failed to merge the patch 
for 7 years... This is the biggest headache



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