File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
core/src/main/scala/org/apache/spark Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,12 @@ private[mesos] class MesosSubmitRequestServlet(
9494 val driverMemory = sparkProperties.get(" spark.driver.memory" )
9595 val driverCores = sparkProperties.get(" spark.driver.cores" )
9696 val appArgs = request.appArgs
97- val environmentVariables = request.environmentVariables
97+ // We don't want to pass down SPARK_HOME when launching Spark apps
98+ // with Mesos cluster mode since it's populated by default on the client and it will
99+ // cause spark-submit script to look for files in SPARK_HOME instead.
100+ // We only need the ability to specify where to find spark-submit script
101+ // which user can user spark.executor.home or spark.home configurations.
102+ val environmentVariables = request.environmentVariables.filter(! _.equals(" SPARK_HOME" ))
98103 val name = request.sparkProperties.get(" spark.app.name" ).getOrElse(mainClass)
99104
100105 // Construct driver description
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import org.apache.spark.util.Utils
3434
3535/**
3636 * Shared trait for implementing a Mesos Scheduler. This holds common state and helper
37- * methods and Mesos scheduler will use.
37+ * methods the Mesos scheduler will use.
3838 */
3939private [mesos] trait MesosSchedulerUtils extends Logging {
4040 // Lock used to wait for scheduler to be registered
You can’t perform that action at this time.
0 commit comments