You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "dengzhhu653 (via GitHub)" <gi...@apache.org> on 2023/04/22 00:32:58 UTC

[GitHub] [hive] dengzhhu653 commented on a diff in pull request #4180: HIVE-27201: Inconsistency between session Hive and thread-local Hive …

dengzhhu653 commented on code in PR #4180:
URL: https://github.com/apache/hive/pull/4180#discussion_r1174237054


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -5795,7 +5796,7 @@ public synchronized IMetaStoreClient getMSC(
         }
         throw ex;
       }
-      String metaStoreUris = conf.getVar(HiveConf.ConfVars.METASTOREURIS);

Review Comment:
   Some tests only set `metastore.thrift.uris`, so `conf.getVar(HiveConf.ConfVars.METASTOREURIS)` is null for this case. 
   HiveMetaStoreClient checks `metastore.thrift.uris` first, and then `hive.metastore.uris`:
   https://github.com/apache/hive/blob/master/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java#L212
   
   So we'd better check the `metastore.thrift.uris` first, and then `hive.metastore.uris` at here.
   
   It's not clear to me why we shouldn't use the `Metastoreconf` in this class, this class stays in hive-exec, and we have use it else where in the same package.
   



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