hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aihu...@apache.org
Subject hive git commit: Revert "HIVE-16057: SchemaTool ignores --passWord argument if hadoop.security.credential.provider.path is configured (Peter Vary, reviewed by Aihua Xu and Vihang Karajgaonkar)"
Date Sat, 04 Mar 2017 13:51:09 GMT
Repository: hive
Updated Branches:
  refs/heads/master 66bdab8dc -> 6337a8fee


Revert "HIVE-16057: SchemaTool ignores --passWord argument if hadoop.security.credential.provider.path
is configured (Peter Vary, reviewed by Aihua Xu and Vihang Karajgaonkar)"

This reverts commit 48596c33bb2c0563ce870a714140952ce0b1c5ef.


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/6337a8fe
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/6337a8fe
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/6337a8fe

Branch: refs/heads/master
Commit: 6337a8fee039aefa65d7d91e2879585dd90f6c51
Parents: 66bdab8
Author: Aihua Xu <aihuaxu@apache.org>
Authored: Sat Mar 4 08:50:22 2017 -0500
Committer: Aihua Xu <aihuaxu@apache.org>
Committed: Sat Mar 4 08:50:22 2017 -0500

----------------------------------------------------------------------
 .../org/apache/hive/beeline/HiveSchemaTool.java    | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/6337a8fe/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
----------------------------------------------------------------------
diff --git a/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java b/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
index 456b4ab..2c088c9 100644
--- a/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
+++ b/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
@@ -90,6 +90,13 @@ public class HiveSchemaTool {
     this.hiveConf = hiveConf;
     this.dbType = dbType;
     this.metaStoreSchemaInfo = new MetaStoreSchemaInfo(hiveHome, hiveConf, dbType);
+    userName = hiveConf.get(ConfVars.METASTORE_CONNECTION_USER_NAME.varname);
+    try {
+      passWord = ShimLoader.getHadoopShims().getPassword(hiveConf,
+          HiveConf.ConfVars.METASTOREPWD.varname);
+    } catch (IOException err) {
+      throw new HiveMetaException("Error getting metastore password", err);
+    }
   }
 
   public HiveConf getHiveConf() {
@@ -1095,19 +1102,9 @@ public class HiveSchemaTool {
 
       if (line.hasOption("userName")) {
         schemaTool.setUserName(line.getOptionValue("userName"));
-      } else {
-        schemaTool.setUserName(
-            schemaTool.getHiveConf().get(ConfVars.METASTORE_CONNECTION_USER_NAME.varname));
       }
       if (line.hasOption("passWord")) {
         schemaTool.setPassWord(line.getOptionValue("passWord"));
-      } else {
-        try {
-          schemaTool.setPassWord(ShimLoader.getHadoopShims().getPassword(schemaTool.getHiveConf(),
-              HiveConf.ConfVars.METASTOREPWD.varname));
-        } catch (IOException err) {
-          throw new HiveMetaException("Error getting metastore password", err);
-        }
       }
       if (line.hasOption("dryRun")) {
         schemaTool.setDryRun(true);


Mime
View raw message