You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by th...@apache.org on 2015/05/01 02:23:24 UTC
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)
Repository: hive
Updated Branches:
refs/heads/branch-1.2 1bcbda62e -> 3eba20b86
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/3eba20b8
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/3eba20b8
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/3eba20b8
Branch: refs/heads/branch-1.2
Commit: 3eba20b86380ee65f04ae0c917b82842d9dd54d6
Parents: 1bcbda6
Author: Thejas Nair <th...@hortonworks.com>
Authored: Thu Apr 30 17:17:31 2015 -0700
Committer: Thejas Nair <th...@hortonworks.com>
Committed: Thu Apr 30 17:17:46 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/3eba20b8/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/3eba20b8/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/3eba20b8/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;
}