You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "wecharyu (via GitHub)" <gi...@apache.org> on 2023/06/22 10:29:45 UTC
[GitHub] [hive] wecharyu commented on a diff in pull request #4444: HIVE-12679: Allow users to be able to specify an implementation of IMetaStoreClient via HiveConf
wecharyu commented on code in PR #4444:
URL: https://github.com/apache/hive/pull/4444#discussion_r1238330949
##########
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:
Agreed! The code will be clearer if we instantiate the client impl in a single factory, maybe just named `HiveMetaStoreClientFactory `.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org