spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liancheng <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-2608] fix executor backend launch commo...
Date Tue, 26 Aug 2014 09:19:51 GMT
Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1986#discussion_r16703504
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackend.scala
---
    @@ -96,18 +99,39 @@ private[spark] class MesosSchedulerBackend(
             .setValue(value)
             .build())
         }
    -    val command = CommandInfo.newBuilder()
    +    val mesosCommand = CommandInfo.newBuilder()
           .setEnvironment(environment)
    -    val uri = sc.conf.get("spark.executor.uri", null)
    -    if (uri == null) {
    -      command.setValue(new File(sparkHome, "/sbin/spark-executor").getCanonicalPath)
    +      
    +    val extraJavaOpts = conf.getOption("spark.executor.extraJavaOptions")
    +      .map(Utils.splitCommandString).getOrElse(Seq.empty)
    +
    +    // Start executors with a few necessary configs for registering with the scheduler
    +    val sparkJavaOpts = Utils.sparkJavaOpts(conf, SparkConf.isExecutorStartupConf)
    +    val javaOpts = sparkJavaOpts ++ extraJavaOpts
    +
    +    val classPathEntries = conf.getOption("spark.executor.extraClassPath").toSeq.flatMap
{ cp =>
    +      cp.split(java.io.File.pathSeparator)
    +    }
    +    val libraryPathEntries =
    +      conf.getOption("spark.executor.extraLibraryPath").toSeq.flatMap { cp =>
    +        cp.split(java.io.File.pathSeparator)
    +      }
    +
    +    val command = Command(
    +      "org.apache.spark.executor.MesosExecutorBackend", Nil, sc.executorEnvs,
    +      classPathEntries, libraryPathEntries, javaOpts)
    --- End diff --
    
    Should set `PYTHONPATH` as what `sbin/spark-executor` does somehow.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message