spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vanzin <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-4697][YARN]System properties should ove...
Date Thu, 04 Dec 2014 19:16:15 GMT
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3557#discussion_r21328217
  
    --- Diff: yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala
---
    @@ -79,10 +79,10 @@ private[spark] class YarnClientSchedulerBackend(
             ("--name", "SPARK_YARN_APP_NAME", "spark.app.name")
           )
         optionTuples.foreach { case (optionName, envVar, sparkProp) =>
    -      if (System.getenv(envVar) != null) {
    -        extraArgs += (optionName, System.getenv(envVar))
    -      } else if (sc.getConf.contains(sparkProp)) {
    +      if (sc.getConf.contains(sparkProp)) {
             extraArgs += (optionName, sc.getConf.get(sparkProp))
    +      } else if (System.getenv(envVar) != null) {
    +        extraArgs += (optionName, System.getenv(envVar))
    --- End diff --
    
    The method you're modifying (`getExtraClientArguments`) is the one that defines the `--name`
argument for `ClientArguments`. And you're inverting the priority here, so that `spark.app.name`
> `SPARK_YARN_APP_NAME`. So basically, since `spark.app.name` is mandatory, `SPARK_YARN_APP_NAME`
becomes useless.
    
    But please test it; make sure both work, both in client and cluster mode. Something might
have changed since those fixes went in, although I kinda doubt it.


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