Repository: hive
Updated Branches:
  refs/heads/master 758b913f2 -> 41de95318


HIVE-18958: Fix Spark config warnings (Bharathkrishna Guruvayoor Murali, 
reviewed by Sahil Takiar)


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

Branch: refs/heads/master
Commit: 41de95318d80df282fbed17ede6b3a05f649cce9
Parents: 758b913
Author: Bharathkrishna Guruvayoor Murali <bhar...@cloudera.com>
Authored: Tue May 1 09:15:29 2018 -0500
Committer: Sahil Takiar <stak...@cloudera.com>
Committed: Tue May 1 09:15:29 2018 -0500

----------------------------------------------------------------------
 data/conf/spark/yarn-client/hive-site.xml       | 314 -------------------
 data/conf/spark/yarn-cluster/hive-site.xml      | 314 +++++++++++++++++++
 .../hadoop/hive/cli/control/CliConfigs.java     |   2 +-
 .../ql/exec/spark/HiveSparkClientFactory.java   |   8 -
 .../apache/hive/spark/client/RemoteDriver.java  |  23 +-
 .../hive/spark/client/SparkClientImpl.java      |   9 +-
 6 files changed, 332 insertions(+), 338 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/41de9531/data/conf/spark/yarn-client/hive-site.xml
----------------------------------------------------------------------
diff --git a/data/conf/spark/yarn-client/hive-site.xml 
b/data/conf/spark/yarn-client/hive-site.xml
deleted file mode 100644
index 6c63362..0000000
--- a/data/conf/spark/yarn-client/hive-site.xml
+++ /dev/null
@@ -1,314 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
--->
-
-<configuration>
-
-<!-- Hive Configuration can either be stored in this file or in the hadoop 
configuration files  -->
-<!-- that are implied by Hadoop setup variables.                               
                 -->
-<!-- Aside from Hadoop setup variables - this file is provided as a 
convenience so that Hive    -->
-<!-- users do not have to edit hadoop configuration files (that may be managed 
as a centralized -->
-<!-- resource).                                                                
                 -->
-
-<!-- Hive Execution Parameters -->
-<property>
-  <name>hadoop.tmp.dir</name>
-  <value>${test.tmp.dir}/hadoop-tmp</value>
-  <description>A base for other temporary directories.</description>
-</property>
-
-<property>
-  <name>hive.exec.scratchdir</name>
-  <value>${test.tmp.dir}/scratchdir</value>
-  <description>Scratch space for Hive jobs</description>
-</property>
-
-<property>
-  <name>hive.exec.local.scratchdir</name>
-  <value>${test.tmp.dir}/localscratchdir/</value>
-  <description>Local scratch space for Hive jobs</description>
-</property>
-
-<property>
-  <name>datanucleus.schema.autoCreateAll</name>
-  <value>true</value>
-</property>
-
-<property>
-  <name>hive.metastore.schema.verification</name>
-  <value>false</value>
-</property>
-
-<property>
-  <name>javax.jdo.option.ConnectionURL</name>
-  
<value>jdbc:derby:;databaseName=${test.tmp.dir}/junit_metastore_db;create=true</value>
-</property>
-
-<property>
-  <name>javax.jdo.option.ConnectionDriverName</name>
-  <value>org.apache.derby.jdbc.EmbeddedDriver</value>
-</property>
-
-<property>
-  <name>javax.jdo.option.ConnectionUserName</name>
-  <value>APP</value>
-</property>
-
-<property>
-  <name>javax.jdo.option.ConnectionPassword</name>
-  <value>mine</value>
-</property>
-
-<property>
-  <!--  this should eventually be deprecated since the metastore should supply 
this -->
-  <name>hive.metastore.warehouse.dir</name>
-  <value>${test.warehouse.dir}</value>
-  <description></description>
-</property>
-
-<property>
-  <name>hive.metastore.metadb.dir</name>
-  <value>file://${test.tmp.dir}/metadb/</value>
-  <description>
-  Required by metastore server or if the uris argument below is not supplied
-  </description>
-</property>
-
-<property>
-  <name>test.log.dir</name>
-  <value>${test.tmp.dir}/log/</value>
-  <description></description>
-</property>
-
-<property>
-  <name>test.data.files</name>
-  <value>${hive.root}/data/files</value>
-  <description></description>
-</property>
-
-<property>
-  <name>hive.jar.path</name>
-  
<value>${maven.local.repository}/org/apache/hive/hive-exec/${hive.version}/hive-exec-${hive.version}.jar</value>
-  <description></description>
-</property>
-
-<property>
-  <name>test.data.scripts</name>
-  <value>${hive.root}/data/scripts</value>
-  <description></description>
-</property>
-
-<property>
-  <name>hive.metastore.rawstore.impl</name>
-  <value>org.apache.hadoop.hive.metastore.ObjectStore</value>
-  <description>Name of the class that implements 
org.apache.hadoop.hive.metastore.rawstore interface. This class is used to 
store and retrieval of raw metadata objects such as table, 
database</description>
-</property>
-
-<property>
-  <name>hive.querylog.location</name>
-  <value>${test.tmp.dir}/tmp</value>
-  <description>Location of the structured hive logs</description>
-</property>
-
-<property>
-  <name>hive.exec.pre.hooks</name>
-  <value>org.apache.hadoop.hive.ql.hooks.PreExecutePrinter, 
org.apache.hadoop.hive.ql.hooks.EnforceReadOnlyTables</value>
-  <description>Pre Execute Hook for Tests</description>
-</property>
-
-<property>
-  <name>hive.exec.post.hooks</name>
-  <value>org.apache.hadoop.hive.ql.hooks.PostExecutePrinter</value>
-  <description>Post Execute Hook for Tests</description>
-</property>
-
-<property>
-  <name>hive.support.concurrency</name>
-  <value>false</value>
-  <description>Whether hive supports concurrency or not. A zookeeper instance 
must be up and running for the default hive lock manager to support read-write 
locks.</description>
-</property>
-
-<property>
-  <name>fs.pfile.impl</name>
-  <value>org.apache.hadoop.fs.ProxyLocalFileSystem</value>
-  <description>A proxy for local file system used for cross file system 
testing</description>
-</property>
-
-<property>
-  <name>hive.exec.mode.local.auto</name>
-  <value>false</value>
-  <description>
-    Let hive determine whether to run in local mode automatically
-    Disabling this for tests so that minimr is not affected
-  </description>
-</property>
-
-<property>
-  <name>hive.auto.convert.join</name>
-  <value>false</value>
-  <description>Whether Hive enable the optimization about converting common 
join into mapjoin based on the input file size</description>
-</property>
-
-<property>
-  <name>hive.ignore.mapjoin.hint</name>
-  <value>false</value>
-  <description>Whether Hive ignores the mapjoin hint</description>
-</property>
-
-<property>
-  <name>io.sort.mb</name>
-  <value>10</value>
-</property>
-
-<property>
-  <name>hive.input.format</name>
-  <value>org.apache.hadoop.hive.ql.io.CombineHiveInputFormat</value>
-  <description>The default input format, if it is not specified, the system 
assigns it. It is set to HiveInputFormat for hadoop versions 17, 18 and 19, 
whereas it is set to CombineHiveInputFormat for hadoop 20. The user can always 
overwrite it - if there is a bug in CombineHiveInputFormat, it can always be 
manually set to HiveInputFormat. </description>
-</property>
-
-<property>
-  <name>hive.default.rcfile.serde</name>
-  <value>org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe</value>
-  <description>The default SerDe hive will use for the rcfile 
format</description>
-</property>
-
-<property>
-  <name>hive.stats.dbclass</name>
-  <value>fs</value>
-  <description>The default storatge that stores temporary hive statistics. 
Currently, fs type is supported</description>
-</property>
-
-<property>
-  <name>hive.execution.engine</name>
-  <value>spark</value>
-  <description>Chooses execution engine. Options are: mr (Map reduce, 
default), tez (hadoop 2 only), spark</description>
-</property>
-
-<property>
-  <name>spark.master</name>
-  <value>yarn</value>
-</property>
-
-<property>
-  <name>spark.submit.deployMode</name>
-  <value>cluster</value>
-</property>
-
-<property>
-  <name>spark.serializer</name>
-  <value>org.apache.spark.serializer.KryoSerializer</value>
-</property>
-
-<property>
-  <name>spark.akka.logLifecycleEvents</name>
-  <value>true</value>
-</property>
-
-<property>
-  <name>hive.spark.log.dir</name>
-  <value>${spark.home}/logs/</value>
-</property>
-
-<property>
-  <name>spark.driver.extraClassPath</name>
-  
<value>${maven.local.repository}/org/apache/hive/hive-it-util/${hive.version}/hive-it-util-${hive.version}.jar:${maven.local.repository}/org/apache/hive/hive-exec/${hive.version}/hive-exec-${hive.version}.jar</value>
-</property>
-
-<property>
-  <name>spark.executor.instances</name>
-  <value>2</value>
-</property>
-
-<property>
-  <name>spark.executor.cores</name>
-  <value>2</value>
-</property>
-
-<property>
-  <name>spark.executor.memory</name>
-  <value>512m</value>
-</property>
-
-<property>
-  <name>spark.yarn.executor.memoryOverhead</name>
-  <value>0</value>
-</property>
-
-<property>
-  <name>spark.driver.memory</name>
-  <value>512m</value>
-</property>
-
-<property>
-  <name>spark.yarn.driver.memoryOverhead</name>
-  <value>0</value>
-</property>
-
-<property>
-  <name>hive.prewarm.enabled</name>
-  <value>true</value>
-</property>
-
-<property>
-  <name>hive.prewarm.spark.timeout</name>
-  <value>30s</value>
-</property>
-
-<property>
-  <name>spark.testing</name>
-  <value>true</value>
-</property>
-
-<property>
-  <name>hive.aux.jars.path</name>
-  
<value>${maven.local.repository}/org/apache/hive/hive-it-util/${hive.version}/hive-it-util-${hive.version}.jar</value>
-</property>
-
-<property>
-  <name>hive.users.in.admin.role</name>
-  <value>hive_admin_user</value>
-</property>
-
-<property>
-  <name>hive.in.test</name>
-  <value>true</value>
-  <description>Internal marker for test. Used for masking env-dependent 
values</description>
-</property>
-
-<property>
-  <name>hive.spark.client.connect.timeout</name>
-  <value>30000ms</value>
-</property>
-
-<property>
-  
<name>yarn.nodemanager.disk-health-checker.max-disk-utilization-per-disk-percentage</name>
-  <value>99</value>
-</property>
-
-<!-- remove this after HIVE-18139 -->
-<property>
-  <name>hive.stats.column.autogather</name>
-  <value>false</value>
-</property>
-
-<property>
-  <name>hive.query.results.cache.enabled</name>
-  <value>false</value>
-</property>
-
-</configuration>

http://git-wip-us.apache.org/repos/asf/hive/blob/41de9531/data/conf/spark/yarn-cluster/hive-site.xml
----------------------------------------------------------------------
diff --git a/data/conf/spark/yarn-cluster/hive-site.xml 
b/data/conf/spark/yarn-cluster/hive-site.xml
new file mode 100644
index 0000000..265e398
--- /dev/null
+++ b/data/conf/spark/yarn-cluster/hive-site.xml
@@ -0,0 +1,314 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<configuration>
+
+<!-- Hive Configuration can either be stored in this file or in the hadoop 
configuration files  -->
+<!-- that are implied by Hadoop setup variables.                               
                 -->
+<!-- Aside from Hadoop setup variables - this file is provided as a 
convenience so that Hive    -->
+<!-- users do not have to edit hadoop configuration files (that may be managed 
as a centralized -->
+<!-- resource).                                                                
                 -->
+
+<!-- Hive Execution Parameters -->
+<property>
+  <name>hadoop.tmp.dir</name>
+  <value>${test.tmp.dir}/hadoop-tmp</value>
+  <description>A base for other temporary directories.</description>
+</property>
+
+<property>
+  <name>hive.exec.scratchdir</name>
+  <value>${test.tmp.dir}/scratchdir</value>
+  <description>Scratch space for Hive jobs</description>
+</property>
+
+<property>
+  <name>hive.exec.local.scratchdir</name>
+  <value>${test.tmp.dir}/localscratchdir/</value>
+  <description>Local scratch space for Hive jobs</description>
+</property>
+
+<property>
+  <name>datanucleus.schema.autoCreateAll</name>
+  <value>true</value>
+</property>
+
+<property>
+  <name>hive.metastore.schema.verification</name>
+  <value>false</value>
+</property>
+
+<property>
+  <name>javax.jdo.option.ConnectionURL</name>
+  
<value>jdbc:derby:;databaseName=${test.tmp.dir}/junit_metastore_db;create=true</value>
+</property>
+
+<property>
+  <name>javax.jdo.option.ConnectionDriverName</name>
+  <value>org.apache.derby.jdbc.EmbeddedDriver</value>
+</property>
+
+<property>
+  <name>javax.jdo.option.ConnectionUserName</name>
+  <value>APP</value>
+</property>
+
+<property>
+  <name>javax.jdo.option.ConnectionPassword</name>
+  <value>mine</value>
+</property>
+
+<property>
+  <!--  this should eventually be deprecated since the metastore should supply 
this -->
+  <name>hive.metastore.warehouse.dir</name>
+  <value>${test.warehouse.dir}</value>
+  <description></description>
+</property>
+
+<property>
+  <name>hive.metastore.metadb.dir</name>
+  <value>file://${test.tmp.dir}/metadb/</value>
+  <description>
+  Required by metastore server or if the uris argument below is not supplied
+  </description>
+</property>
+
+<property>
+  <name>test.log.dir</name>
+  <value>${test.tmp.dir}/log/</value>
+  <description></description>
+</property>
+
+<property>
+  <name>test.data.files</name>
+  <value>${hive.root}/data/files</value>
+  <description></description>
+</property>
+
+<property>
+  <name>hive.jar.path</name>
+  
<value>${maven.local.repository}/org/apache/hive/hive-exec/${hive.version}/hive-exec-${hive.version}.jar</value>
+  <description></description>
+</property>
+
+<property>
+  <name>test.data.scripts</name>
+  <value>${hive.root}/data/scripts</value>
+  <description></description>
+</property>
+
+<property>
+  <name>hive.metastore.rawstore.impl</name>
+  <value>org.apache.hadoop.hive.metastore.ObjectStore</value>
+  <description>Name of the class that implements 
org.apache.hadoop.hive.metastore.rawstore interface. This class is used to 
store and retrieval of raw metadata objects such as table, 
database</description>
+</property>
+
+<property>
+  <name>hive.querylog.location</name>
+  <value>${test.tmp.dir}/tmp</value>
+  <description>Location of the structured hive logs</description>
+</property>
+
+<property>
+  <name>hive.exec.pre.hooks</name>
+  <value>org.apache.hadoop.hive.ql.hooks.PreExecutePrinter, 
org.apache.hadoop.hive.ql.hooks.EnforceReadOnlyTables</value>
+  <description>Pre Execute Hook for Tests</description>
+</property>
+
+<property>
+  <name>hive.exec.post.hooks</name>
+  <value>org.apache.hadoop.hive.ql.hooks.PostExecutePrinter</value>
+  <description>Post Execute Hook for Tests</description>
+</property>
+
+<property>
+  <name>hive.support.concurrency</name>
+  <value>false</value>
+  <description>Whether hive supports concurrency or not. A zookeeper instance 
must be up and running for the default hive lock manager to support read-write 
locks.</description>
+</property>
+
+<property>
+  <name>fs.pfile.impl</name>
+  <value>org.apache.hadoop.fs.ProxyLocalFileSystem</value>
+  <description>A proxy for local file system used for cross file system 
testing</description>
+</property>
+
+<property>
+  <name>hive.exec.mode.local.auto</name>
+  <value>false</value>
+  <description>
+    Let hive determine whether to run in local mode automatically
+    Disabling this for tests so that minimr is not affected
+  </description>
+</property>
+
+<property>
+  <name>hive.auto.convert.join</name>
+  <value>false</value>
+  <description>Whether Hive enable the optimization about converting common 
join into mapjoin based on the input file size</description>
+</property>
+
+<property>
+  <name>hive.ignore.mapjoin.hint</name>
+  <value>false</value>
+  <description>Whether Hive ignores the mapjoin hint</description>
+</property>
+
+<property>
+  <name>io.sort.mb</name>
+  <value>10</value>
+</property>
+
+<property>
+  <name>hive.input.format</name>
+  <value>org.apache.hadoop.hive.ql.io.CombineHiveInputFormat</value>
+  <description>The default input format, if it is not specified, the system 
assigns it. It is set to HiveInputFormat for hadoop versions 17, 18 and 19, 
whereas it is set to CombineHiveInputFormat for hadoop 20. The user can always 
overwrite it - if there is a bug in CombineHiveInputFormat, it can always be 
manually set to HiveInputFormat. </description>
+</property>
+
+<property>
+  <name>hive.default.rcfile.serde</name>
+  <value>org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe</value>
+  <description>The default SerDe hive will use for the rcfile 
format</description>
+</property>
+
+<property>
+  <name>hive.stats.dbclass</name>
+  <value>fs</value>
+  <description>The default storatge that stores temporary hive statistics. 
Currently, fs type is supported</description>
+</property>
+
+<property>
+  <name>hive.execution.engine</name>
+  <value>spark</value>
+  <description>Chooses execution engine. Options are: mr (Map reduce, 
default), tez (hadoop 2 only), spark</description>
+</property>
+
+<property>
+  <name>spark.master</name>
+  <value>yarn</value>
+</property>
+
+<property>
+  <name>spark.submit.deployMode</name>
+  <value>cluster</value>
+</property>
+
+<property>
+  <name>spark.serializer</name>
+  <value>org.apache.spark.serializer.KryoSerializer</value>
+</property>
+
+<property>
+  <name>spark.akka.logLifecycleEvents</name>
+  <value>true</value>
+</property>
+
+<property>
+  <name>hive.spark.log.dir</name>
+  <value>${spark.home}/logs/</value>
+</property>
+
+<property>
+  <name>spark.driver.extraClassPath</name>
+  
<value>${maven.local.repository}/org/apache/hive/hive-it-util/${hive.version}/hive-it-util-${hive.version}.jar:${maven.local.repository}/org/apache/hive/hive-exec/${hive.version}/hive-exec-${hive.version}.jar</value>
+</property>
+
+<property>
+  <name>spark.executor.instances</name>
+  <value>2</value>
+</property>
+
+<property>
+  <name>spark.executor.cores</name>
+  <value>2</value>
+</property>
+
+<property>
+  <name>spark.executor.memory</name>
+  <value>512m</value>
+</property>
+
+<property>
+  <name>spark.executor.memoryOverhead</name>
+  <value>0</value>
+</property>
+
+<property>
+  <name>spark.driver.memory</name>
+  <value>512m</value>
+</property>
+
+<property>
+  <name>spark.driver.memoryOverhead</name>
+  <value>0</value>
+</property>
+
+<property>
+  <name>hive.prewarm.enabled</name>
+  <value>true</value>
+</property>
+
+<property>
+  <name>hive.prewarm.spark.timeout</name>
+  <value>30s</value>
+</property>
+
+<property>
+  <name>spark.testing</name>
+  <value>true</value>
+</property>
+
+<property>
+  <name>hive.aux.jars.path</name>
+  
<value>${maven.local.repository}/org/apache/hive/hive-it-util/${hive.version}/hive-it-util-${hive.version}.jar</value>
+</property>
+
+<property>
+  <name>hive.users.in.admin.role</name>
+  <value>hive_admin_user</value>
+</property>
+
+<property>
+  <name>hive.in.test</name>
+  <value>true</value>
+  <description>Internal marker for test. Used for masking env-dependent 
values</description>
+</property>
+
+<property>
+  <name>hive.spark.client.connect.timeout</name>
+  <value>30000ms</value>
+</property>
+
+<property>
+  
<name>yarn.nodemanager.disk-health-checker.max-disk-utilization-per-disk-percentage</name>
+  <value>99</value>
+</property>
+
+<!-- remove this after HIVE-18139 -->
+<property>
+  <name>hive.stats.column.autogather</name>
+  <value>false</value>
+</property>
+
+<property>
+  <name>hive.query.results.cache.enabled</name>
+  <value>false</value>
+</property>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/hive/blob/41de9531/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java
----------------------------------------------------------------------
diff --git 
a/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java 
b/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java
index 8ee7fb9..6628336 100644
--- 
a/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java
+++ 
b/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java
@@ -579,7 +579,7 @@ public class CliConfigs {
         setInitScript("q_test_init.sql");
         setCleanupScript("q_test_cleanup.sql");
 
-        setHiveConfDir("data/conf/spark/yarn-client");
+        setHiveConfDir("data/conf/spark/yarn-cluster");
         setClusterType(MiniClusterType.miniSparkOnYarn);
       } catch (Exception e) {
         throw new RuntimeException("can't construct cliconfig", e);

http://git-wip-us.apache.org/repos/asf/hive/blob/41de9531/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/HiveSparkClientFactory.java
----------------------------------------------------------------------
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/HiveSparkClientFactory.java 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/HiveSparkClientFactory.java
index c22fb89..565c43b 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/HiveSparkClientFactory.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/HiveSparkClientFactory.java
@@ -41,7 +41,6 @@ import 
org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
 import org.apache.hadoop.hive.ql.io.HiveKey;
 import org.apache.hadoop.io.BytesWritable;
 import org.apache.hadoop.io.Writable;
-import org.apache.hive.spark.client.rpc.RpcConfiguration;
 import org.apache.spark.SparkConf;
 
 import com.google.common.base.Joiner;
@@ -199,13 +198,6 @@ public class HiveSparkClientFactory {
           "Pass Oozie configuration (%s -> %s).", propertyName, 
LogUtils.maskIfPassword(propertyName,value)));
       }
 
-      if (RpcConfiguration.HIVE_SPARK_RSC_CONFIGS.contains(propertyName)) {
-        String value = RpcConfiguration.getValue(hiveConf, propertyName);
-        sparkConf.put(propertyName, value);
-        LOG.debug(String.format(
-          "load RPC property from hive configuration (%s -> %s).",
-          propertyName, LogUtils.maskIfPassword(propertyName,value)));
-      }
     }
 
     final boolean optShuffleSerDe = hiveConf.getBoolVar(

http://git-wip-us.apache.org/repos/asf/hive/blob/41de9531/spark-client/src/main/java/org/apache/hive/spark/client/RemoteDriver.java
----------------------------------------------------------------------
diff --git 
a/spark-client/src/main/java/org/apache/hive/spark/client/RemoteDriver.java 
b/spark-client/src/main/java/org/apache/hive/spark/client/RemoteDriver.java
index 255c305..6e546d4 100644
--- a/spark-client/src/main/java/org/apache/hive/spark/client/RemoteDriver.java
+++ b/spark-client/src/main/java/org/apache/hive/spark/client/RemoteDriver.java
@@ -90,6 +90,10 @@ public class RemoteDriver {
   private volatile JobContextImpl jc;
   private volatile boolean running;
 
+  public static final String REMOTE_DRIVER_HOST_CONF = "--remote-host";
+  public static final String REMOTE_DRIVER_PORT_CONF = "--remote-port";
+  public static final String REMOTE_DRIVER_CONF = "--remote-driver-conf";
+
   private RemoteDriver(String[] args) throws Exception {
     this.activeJobs = Maps.newConcurrentMap();
     this.jcLock = new Object();
@@ -101,22 +105,20 @@ public class RemoteDriver {
     SparkConf conf = new SparkConf();
     String serverAddress = null;
     int serverPort = -1;
+    Map<String, String> mapConf = Maps.newHashMap();
     for (int idx = 0; idx < args.length; idx += 2) {
       String key = args[idx];
-      if (key.equals("--remote-host")) {
+      if (REMOTE_DRIVER_HOST_CONF.equals(key)) {
         serverAddress = getArg(args, idx);
-      } else if (key.equals("--remote-port")) {
+      } else if (REMOTE_DRIVER_PORT_CONF.equals(key)) {
         serverPort = Integer.parseInt(getArg(args, idx));
-      } else if (key.equals("--client-id")) {
-        conf.set(SparkClientFactory.CONF_CLIENT_ID, getArg(args, idx));
-      } else if (key.equals("--secret")) {
-        conf.set(SparkClientFactory.CONF_KEY_SECRET, getArg(args, idx));
-      } else if (key.equals("--conf")) {
+      } else if (REMOTE_DRIVER_CONF.equals(key)) {
         String[] val = getArg(args, idx).split("[=]", 2);
-        conf.set(val[0], val[1]);
+        //set these only in mapConf and not in SparkConf,
+        // as these are non-spark specific configs used by the remote driver
+        mapConf.put(val[0], val[1]);
       } else {
-        throw new IllegalArgumentException("Invalid command line: "
-          + Joiner.on(" ").join(args));
+        throw new IllegalArgumentException("Invalid command line: " + 
Joiner.on(" ").join(args));
       }
     }
 
@@ -124,7 +126,6 @@ public class RemoteDriver {
 
     LOG.info("Connecting to: {}:{}", serverAddress, serverPort);
 
-    Map<String, String> mapConf = Maps.newHashMap();
     for (Tuple2<String, String> e : conf.getAll()) {
       mapConf.put(e._1(), e._2());
       LOG.debug("Remote Driver configured with: " + e._1() + "=" + e._2());

http://git-wip-us.apache.org/repos/asf/hive/blob/41de9531/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 e4f72a3..d450515 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
@@ -430,16 +430,17 @@ class SparkClientImpl implements SparkClient {
     }
     argv.add(jar);
 
-    argv.add("--remote-host");
+    argv.add(RemoteDriver.REMOTE_DRIVER_HOST_CONF);
     argv.add(serverAddress);
-    argv.add("--remote-port");
+    argv.add(RemoteDriver.REMOTE_DRIVER_PORT_CONF);
     argv.add(serverPort);
 
-    //hive.spark.* keys are passed down to the RemoteDriver via --conf,
+    //hive.spark.* keys are passed down to the RemoteDriver via 
REMOTE_DRIVER_CONF
+    // so that they are not used in sparkContext but only in remote driver,
     //as --properties-file contains the spark.* keys that are meant for 
SparkConf object.
     for (String hiveSparkConfKey : RpcConfiguration.HIVE_SPARK_RSC_CONFIGS) {
       String value = RpcConfiguration.getValue(hiveConf, hiveSparkConfKey);
-      argv.add("--conf");
+      argv.add(RemoteDriver.REMOTE_DRIVER_CONF);
       argv.add(String.format("%s=%s", hiveSparkConfKey, value));
     }
 

Reply via email to