You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2015/09/22 06:10:04 UTC

spark git commit: [SPARK-10711] [SPARKR] Do not assume spark.submit.deployMode is always set

Repository: spark
Updated Branches:
  refs/heads/master 0494c80ef -> c986e933a


[SPARK-10711] [SPARKR] Do not assume spark.submit.deployMode is always set

In ```RUtils.sparkRPackagePath()``` we
1. Call ``` sys.props("spark.submit.deployMode")``` which returns null if ```spark.submit.deployMode``` is not suet
2. Call ``` sparkConf.get("spark.submit.deployMode")``` which throws ```NoSuchElementException``` if ```spark.submit.deployMode``` is not set. This patch simply passes a default value ("cluster") for ```spark.submit.deployMode```.

cc rxin

Author: Hossein <ho...@databricks.com>

Closes #8832 from falaki/SPARK-10711.


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

Branch: refs/heads/master
Commit: c986e933a900602af47966bd41edb2116c421a39
Parents: 0494c80
Author: Hossein <ho...@databricks.com>
Authored: Mon Sep 21 21:09:59 2015 -0700
Committer: Reynold Xin <rx...@databricks.com>
Committed: Mon Sep 21 21:09:59 2015 -0700

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/api/r/RUtils.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/c986e933/core/src/main/scala/org/apache/spark/api/r/RUtils.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/api/r/RUtils.scala b/core/src/main/scala/org/apache/spark/api/r/RUtils.scala
index 9e807cc..fd5646b 100644
--- a/core/src/main/scala/org/apache/spark/api/r/RUtils.scala
+++ b/core/src/main/scala/org/apache/spark/api/r/RUtils.scala
@@ -44,7 +44,7 @@ private[spark] object RUtils {
         (sys.props("spark.master"), sys.props("spark.submit.deployMode"))
       } else {
         val sparkConf = SparkEnv.get.conf
-        (sparkConf.get("spark.master"), sparkConf.get("spark.submit.deployMode"))
+        (sparkConf.get("spark.master"), sparkConf.get("spark.submit.deployMode", "client"))
       }
 
     val isYarnCluster = master != null && master.contains("yarn") && deployMode == "cluster"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org