Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/6083#discussion_r30239742
--- 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 --
Interesting related question came up just a moment ago; is this supposed to
be `spark.yarn.app.id`? someone just suggested that it should always be
`spark.app.id`. Thought I'd ask if you guys know.
Given the discussion, this seems like a reasonable change.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]