spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrewor14 <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-4697][YARN]System properties should ove...
Date Tue, 13 Jan 2015 17:35:54 GMT
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3557#discussion_r22878597
  
    --- Diff: yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala
---
    @@ -88,18 +87,19 @@ private[spark] class YarnClientSchedulerBackend(
         // Do the same for deprecated properties: property -> suggestion
         val deprecatedProps = Map("spark.master.memory" -> "--driver-memory through spark-submit")
         optionTuples.foreach { case (optionName, envVar, sparkProp) =>
    -      if (System.getenv(envVar) != null) {
    -        extraArgs += (optionName, System.getenv(envVar))
    -        if (deprecatedEnvVars.contains(envVar)) {
    -          logWarning(s"NOTE: $envVar is deprecated. Use ${deprecatedEnvVars(envVar)}
instead.")
    -        }
    -      } else if (sc.getConf.contains(sparkProp)) {
    +      if (sc.getConf.contains(sparkProp)) {
             extraArgs += (optionName, sc.getConf.get(sparkProp))
             if (deprecatedProps.contains(sparkProp)) {
               logWarning(s"NOTE: $sparkProp is deprecated. Use ${deprecatedProps(sparkProp)}
instead.")
             }
    +      } else if (System.getenv(envVar) != null) {
    +        extraArgs += (optionName, System.getenv(envVar))
    +        if (deprecatedEnvVars.contains(envVar)) {
    +          logWarning(s"NOTE: $envVar is deprecated. Use ${deprecatedEnvVars(envVar)}
instead.")
    +        }
           }
         }
    +    sc.getConf.getOption("spark.app.name").foreach(v => extraArgs += ("--name", v))
    --- End diff --
    
    We need to add a comment here to explain why it's a special case


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