You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by liyezhang556520 <gi...@git.apache.org> on 2014/07/17 10:36:46 UTC

[GitHub] spark pull request: Clean up and simplify Spark configuration

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

    https://github.com/apache/spark/pull/299#discussion_r15046137
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/CoarseMesosSchedulerBackend.scala ---
    @@ -123,20 +134,22 @@ private[spark] class CoarseMesosSchedulerBackend(
           conf.get("spark.driver.host"),
           conf.get("spark.driver.port"),
           CoarseGrainedSchedulerBackend.ACTOR_NAME)
    +
         val uri = conf.get("spark.executor.uri", null)
         if (uri == null) {
           val runScript = new File(sparkHome, "./bin/spark-class").getCanonicalPath
           command.setValue(
    -        "\"%s\" org.apache.spark.executor.CoarseGrainedExecutorBackend %s %s %s %d".format(
    -          runScript, driverUrl, offer.getSlaveId.getValue, offer.getHostname, numCores))
    +        "\"%s\" org.apache.spark.executor.CoarseGrainedExecutorBackend %s %s %s %s %d".format(
    +          runScript, extraOpts, driverUrl, offer.getSlaveId.getValue, offer.getHostname, numCores))
    --- End diff --
    
    @pwendell <code>extraOpts</code> will be read as arguments of <code>org.apache.spark.executor.CoarseGrainedExecutorBackend</code>, which will lead to parse error if <code>extraOpts</code> is not empty. Because the 4th argument of <code>CoarseGrainedExecutorBackend</code> is <code>Int</code> type, and if <code>extraOpts</code> is not empty, other values instead of <code>numCores</code> will be regarded as 4th argument to cast to Int and cause error. Do I have any misunderstanding of this:)


---
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.
---