Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5917#discussion_r29734447
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala
 ---
    @@ -371,15 +371,30 @@ private[spark] class MesosClusterScheduler(
         envBuilder.addVariables(
           
Variable.newBuilder().setName("SPARK_EXECUTOR_OPTS").setValue(executorOpts))
         val cmdOptions = generateCmdOption(desc)
    +    val dockerDefined = 
desc.schedulerProperties.contains("spark.mesos.executor.docker.image")
         val executorUri = desc.schedulerProperties.get("spark.executor.uri")
           .orElse(desc.command.environment.get("SPARK_EXECUTOR_URI"))
         val appArguments = desc.command.arguments.mkString(" ")
    -    val cmd = if (executorUri.isDefined) {
    +    val (executable, jar) = if (dockerDefined) {
    +      val executorOpts = desc.schedulerProperties
    +        .filterKeys(_.contains("docker"))
    +        .map { case (k, v) =>
    +        s"-D$k=$v"
    +      }.mkString(" ")
    +      // Pass docker options to executors
    +      envBuilder.addVariables(
    +        Variable.newBuilder()
    +          .setName("SPARK_EXECUTOR_OPTS")
    +          .setValue(executorOpts))
    +      // Application jar is automatically downloaded in the mounted 
sandbox by Mesos,
    +      // and the path to the mounted volume is stored in $MESOS_SANDBOX 
env variable.
    +      ("./bin/spark-submit", 
s"$$MESOS_SANDBOX/${desc.jarUrl.split("/").last}")
    --- End diff --
    
    sorry, maybe I'm missing something but why are there two dollar signs?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to