sourabh912 commented on code in PR #3233:
URL: https://github.com/apache/hive/pull/3233#discussion_r866206252
##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java:
##########
@@ -605,27 +608,44 @@ private THttpClient createHttpClient(URI store, boolean
useSSL) throws MetaExcep
String path = MetaStoreUtils.getHttpPath(MetastoreConf.getVar(conf,
ConfVars.THRIFT_HTTP_PATH));
String httpUrl = (useSSL ? "https://" : "http://") + store.getHost() + ":"
+ store.getPort() + path;
- String user = MetastoreConf.getVar(conf,
ConfVars.METASTORE_CLIENT_PLAIN_USERNAME);
- if (user == null || user.equals("")) {
- try {
- LOG.debug("No username passed in config " +
ConfVars.METASTORE_CLIENT_PLAIN_USERNAME.getHiveName() +
- ". Trying to get the current user from UGI" );
- user = UserGroupInformation.getCurrentUser().getShortUserName();
- } catch (IOException e) {
- throw new MetaException("Failed to get client username from UGI");
+ HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
+ String authType = MetastoreConf.getAsString(conf,
ConfVars.METASTORE_CLIENT_AUTH_MODE).toLowerCase(
Review Comment:
@dengzhhu653 : Makes sense. I will make the change.
--
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]