aboutsummaryrefslogtreecommitdiff
path: root/yarn/src
diff options
context:
space:
mode:
authorJeff Zhang <zjffdu@apache.org>2016-11-02 11:47:45 -0700
committerMarcelo Vanzin <vanzin@cloudera.com>2016-11-02 11:47:45 -0700
commit3c24299b71e23e159edbb972347b13430f92a465 (patch)
treeaf6c8aa0fe13aaf1b35fa424667f04ca1e217cf0 /yarn/src
parent02f203107b8eda1f1576e36c4f12b0e3bc5e910e (diff)
downloadspark-3c24299b71e23e159edbb972347b13430f92a465.tar.gz
spark-3c24299b71e23e159edbb972347b13430f92a465.tar.bz2
spark-3c24299b71e23e159edbb972347b13430f92a465.zip
[SPARK-18160][CORE][YARN] spark.files & spark.jars should not be passed to driver in yarn mode
## What changes were proposed in this pull request? spark.files is still passed to driver in yarn mode, so SparkContext will still handle it which cause the error in the jira desc. ## How was this patch tested? Tested manually in a 5 node cluster. As this issue only happens in multiple node cluster, so I didn't write test for it. Author: Jeff Zhang <zjffdu@apache.org> Closes #15669 from zjffdu/SPARK-18160.
Diffstat (limited to 'yarn/src')
-rw-r--r--yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala b/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
index 55e4a833b6..053a78617d 100644
--- a/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
+++ b/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
@@ -1202,7 +1202,10 @@ private object Client extends Logging {
// Note that any env variable with the SPARK_ prefix gets propagated to all (remote) processes
System.setProperty("SPARK_YARN_MODE", "true")
val sparkConf = new SparkConf
-
+ // SparkSubmit would use yarn cache to distribute files & jars in yarn mode,
+ // so remove them from sparkConf here for yarn mode.
+ sparkConf.remove("spark.jars")
+ sparkConf.remove("spark.files")
val args = new ClientArguments(argStrings)
new Client(args, sparkConf).run()
}