aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Or <andrew@databricks.com>2015-12-18 16:22:51 -0800
committerAndrew Or <andrew@databricks.com>2015-12-18 16:22:51 -0800
commita78a91f4d7239c14bd5d0b18cdc87d55594a8d8a (patch)
tree28af7ce2bccab607d421aad27d55ada3704ecb53
parent8a9417bc4b227c57bdb0a5a38a225dbdf6e69f64 (diff)
downloadspark-a78a91f4d7239c14bd5d0b18cdc87d55594a8d8a.tar.gz
spark-a78a91f4d7239c14bd5d0b18cdc87d55594a8d8a.tar.bz2
spark-a78a91f4d7239c14bd5d0b18cdc87d55594a8d8a.zip
Revert "[SPARK-12345][MESOS] Filter SPARK_HOME when submitting Spark jobs with Mesos cluster mode."
This reverts commit ad8c1f0b840284d05da737fb2cc5ebf8848f4490.
-rw-r--r--core/src/main/scala/org/apache/spark/deploy/rest/mesos/MesosRestServer.scala7
-rw-r--r--core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala2
2 files changed, 2 insertions, 7 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/rest/mesos/MesosRestServer.scala b/core/src/main/scala/org/apache/spark/deploy/rest/mesos/MesosRestServer.scala
index 24510db2bd..868cc35d06 100644
--- a/core/src/main/scala/org/apache/spark/deploy/rest/mesos/MesosRestServer.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/rest/mesos/MesosRestServer.scala
@@ -94,12 +94,7 @@ private[mesos] class MesosSubmitRequestServlet(
val driverMemory = sparkProperties.get("spark.driver.memory")
val driverCores = sparkProperties.get("spark.driver.cores")
val appArgs = request.appArgs
- // We don't want to pass down SPARK_HOME when launching Spark apps
- // with Mesos cluster mode since it's populated by default on the client and it will
- // cause spark-submit script to look for files in SPARK_HOME instead.
- // We only need the ability to specify where to find spark-submit script
- // which user can user spark.executor.home or spark.home configurations.
- val environmentVariables = request.environmentVariables.filter(!_.equals("SPARK_HOME"))
+ val environmentVariables = request.environmentVariables
val name = request.sparkProperties.get("spark.app.name").getOrElse(mainClass)
// Construct driver description
diff --git a/core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala b/core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala
index 573355ba58..721861fbbc 100644
--- a/core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala
+++ b/core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala
@@ -34,7 +34,7 @@ import org.apache.spark.util.Utils
/**
* Shared trait for implementing a Mesos Scheduler. This holds common state and helper
- * methods the Mesos scheduler will use.
+ * methods and Mesos scheduler will use.
*/
private[mesos] trait MesosSchedulerUtils extends Logging {
// Lock used to wait for scheduler to be registered