You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by xu...@apache.org on 2015/08/15 00:30:57 UTC

hive git commit: HIVE-11549: Hide Hive configuration from spark driver launching process (reviewed by Chao)

Repository: hive
Updated Branches:
  refs/heads/master 2ccd06169 -> fe1efe520


HIVE-11549: Hide Hive configuration from spark driver launching process (reviewed by Chao)


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

Branch: refs/heads/master
Commit: fe1efe520b807f24085d87fea8fc1c5ee0c9e44c
Parents: 2ccd061
Author: Xuefu Zhang <xz...@Cloudera.com>
Authored: Fri Aug 14 15:30:52 2015 -0700
Committer: Xuefu Zhang <xz...@Cloudera.com>
Committed: Fri Aug 14 15:30:52 2015 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hive/spark/client/SparkClientImpl.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/fe1efe52/spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java
----------------------------------------------------------------------
diff --git a/spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java b/spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java
index e1e64a7..2546a46 100644
--- a/spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java
+++ b/spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java
@@ -423,6 +423,10 @@ class SparkClientImpl implements SparkClient {
       LOG.info("Running client driver with argv: {}", cmd);
       ProcessBuilder pb = new ProcessBuilder("sh", "-c", cmd);
 
+      // Prevent hive configurations from being visible in Spark.
+      pb.environment().remove("HIVE_HOME");
+      pb.environment().remove("HIVE_CONF_DIR");
+
       if (isTesting != null) {
         pb.environment().put("SPARK_TESTING", isTesting);
       }