You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by kh...@apache.org on 2015/11/06 18:26:16 UTC

hive git commit: HIVE-12345 : Followup for HIVE-9013 : Hidden conf vars still visible through beeline (Sushanth Sowmyan, reviewed by Thejas Nair)

Repository: hive
Updated Branches:
  refs/heads/branch-1.2 218247555 -> 44c6c480f


HIVE-12345 : Followup for HIVE-9013 : Hidden conf vars still visible through beeline (Sushanth Sowmyan, reviewed by Thejas Nair)


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

Branch: refs/heads/branch-1.2
Commit: 44c6c480f1be421c72c2595ac5d9463ffbc2497b
Parents: 2182475
Author: Sushanth Sowmyan <kh...@gmail.com>
Authored: Fri Nov 6 09:25:42 2015 -0800
Committer: Sushanth Sowmyan <kh...@gmail.com>
Committed: Fri Nov 6 09:25:42 2015 -0800

----------------------------------------------------------------------
 common/src/java/org/apache/hadoop/hive/conf/HiveConf.java |  1 +
 .../test/java/org/apache/hive/jdbc/TestJdbcDriver2.java   | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/44c6c480/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
----------------------------------------------------------------------
diff --git a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
index 68ed1ea..dd389b0 100644
--- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
+++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
@@ -2670,6 +2670,7 @@ public class HiveConf extends Configuration {
     auxJars = other.auxJars;
     origProp = (Properties)other.origProp.clone();
     restrictList.addAll(other.restrictList);
+    hiddenSet.addAll(other.hiddenSet);
     modWhiteListPattern = other.modWhiteListPattern;
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/44c6c480/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
index 34ae18c..634bd2a 100644
--- a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
+++ b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
@@ -1832,7 +1832,15 @@ public void testParseUrlHttpMode() throws SQLException, JdbcUriParseException,
     assertEquals(SET_COLUMN_NAME, md.getColumnLabel(1));
 
     //check if there is data in the resultset
-    assertTrue("Nothing returned by set -v", res.next());
+    int numLines = 0;
+    while (res.next()){
+      numLines++;
+      String rline = res.getString(1);
+      assertFalse("set output must not contain hidden variables such as the metastore password:"+rline,
+          rline.contains(HiveConf.ConfVars.METASTOREPWD.varname) && !(rline.contains(HiveConf.ConfVars.HIVE_CONF_HIDDEN_LIST.varname)));
+        // the only conf allowed to have the metastore pwd keyname is the hidden list configuration value
+    }
+    assertTrue("Nothing returned by set -v", numLines > 0);
 
     res.close();
     stmt.close();