spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehnalis <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-7504] [YARN] NullPointerException when ...
Date Wed, 13 May 2015 20:33:07 GMT
Github user ehnalis commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6083#discussion_r30272841
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -371,6 +371,14 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli
           throw new SparkException("An application name must be set in your configuration")
         }
     
    +    // System property spark.yarn.app.id must be set if user code ran by AM on a YARN
cluster
    +    // yarn-standalone is deprecated, but still supported
    +    if ((master == "yarn-cluster" || master == "yarn-standalone") &&
    +        !_conf.contains("spark.yarn.app.id")) {
    --- End diff --
    
    This is an early and clean solution, rather than checking for the master. YARN cluster
mode the SparkContext is launched as a separate user thread at container 0 and joined later.
    
    @srowen If you resolve it, I will remove `yarn` from the configuration parameter, but
you can do it afterwards. Just to keep pull-request timeline.


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