hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From the...@apache.org
Subject hive git commit: HIVE-10508 : Strip out password information from config passed to Tez/MR in cases where password encryption is not used (Hari Sankar Sivarama Subramaniyan via Thejas Nair)
Date Fri, 01 May 2015 00:23:31 GMT
Repository: hive
Updated Branches:
  refs/heads/master a96913d0f -> bcde1ce1d


HIVE-10508 : Strip out password information from config passed to Tez/MR in cases where password
encryption is not used (Hari Sankar Sivarama Subramaniyan via Thejas Nair)


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

Branch: refs/heads/master
Commit: bcde1ce1db1c40d36c1b2c4613605057aa29762c
Parents: a96913d
Author: Thejas Nair <thejas@hortonworks.com>
Authored: Thu Apr 30 17:17:31 2015 -0700
Committer: Thejas Nair <thejas@hortonworks.com>
Committed: Thu Apr 30 17:17:31 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/ql/exec/Utilities.java | 13 +++++++++++++
 .../org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java  |  1 +
 .../org/apache/hadoop/hive/ql/exec/tez/DagUtils.java   |  1 +
 3 files changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/bcde1ce1/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
index 3ee73ef..ad5c8f8 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
@@ -3858,4 +3858,17 @@ public final class Utilities {
     return conf.getBoolVar(HiveConf.ConfVars.HIVE_SERVER2_LOGGING_OPERATION_ENABLED) &&
       (loggingLevel.equalsIgnoreCase("PERFORMANCE") || loggingLevel.equalsIgnoreCase("VERBOSE"));
   }
+
+  /**
+   * Strips Hive password details from configuration
+   */
+  public static void stripHivePasswordDetails(Configuration conf) {
+    // Strip out all Hive related password information from the JobConf
+    if (HiveConf.getVar(conf, HiveConf.ConfVars.METASTOREPWD) != null) {
+      HiveConf.setVar(conf, HiveConf.ConfVars.METASTOREPWD, "");
+    }
+    if (HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PASSWORD) != null)
{
+      HiveConf.setVar(conf, HiveConf.ConfVars.HIVE_SERVER2_SSL_KEYSTORE_PASSWORD, "");
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/bcde1ce1/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java
index 51b5941..d7a08ec 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java
@@ -164,6 +164,7 @@ public class ExecDriver extends Task<MapredWork> implements Serializable,
Hadoop
     if (StringUtils.isNotBlank(addedArchives)) {
       HiveConf.setVar(job, ConfVars.HIVEADDEDARCHIVES, addedArchives);
     }
+    Utilities.stripHivePasswordDetails(job);
     this.jobExecHelper = new HadoopJobExecHelper(job, console, this, this);
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/bcde1ce1/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java
index 204ad6e..f773cb9 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java
@@ -1015,6 +1015,7 @@ public class DagUtils {
     conf.set("mapred.partitioner.class", HiveConf.getVar(conf, HiveConf.ConfVars.HIVEPARTITIONER));
     conf.set("tez.runtime.partitioner.class", MRPartitioner.class.getName());
 
+    Utilities.stripHivePasswordDetails(conf);
     return conf;
   }
 


Mime
View raw message