aboutsummaryrefslogtreecommitdiff
path: root/yarn
diff options
context:
space:
mode:
authorMarcelo Vanzin <vanzin@cloudera.com>2014-05-08 20:46:11 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-05-08 20:46:11 -0700
commit3f779d872d8459b262b3db9e4d12b011910b6ce9 (patch)
treefa917461e19feef87405363a55263baadd591b4c /yarn
parent8b7841299439b7dc590b2f7e2339f24e8f3e19f6 (diff)
downloadspark-3f779d872d8459b262b3db9e4d12b011910b6ce9.tar.gz
spark-3f779d872d8459b262b3db9e4d12b011910b6ce9.tar.bz2
spark-3f779d872d8459b262b3db9e4d12b011910b6ce9.zip
[SPARK-1631] Correctly set the Yarn app name when launching the AM.
Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #539 from vanzin/yarn-app-name and squashes the following commits: 7d1ca4f [Marcelo Vanzin] [SPARK-1631] Correctly set the Yarn app name when launching the AM.
Diffstat (limited to 'yarn')
-rw-r--r--yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala b/yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala
index ce2dde0631..2924189077 100644
--- a/yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala
+++ b/yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala
@@ -35,10 +35,10 @@ private[spark] class YarnClientSchedulerBackend(
private[spark] def addArg(optionName: String, envVar: String, sysProp: String,
arrayBuf: ArrayBuffer[String]) {
- if (System.getProperty(sysProp) != null) {
- arrayBuf += (optionName, System.getProperty(sysProp))
- } else if (System.getenv(envVar) != null) {
+ if (System.getenv(envVar) != null) {
arrayBuf += (optionName, System.getenv(envVar))
+ } else if (sc.getConf.contains(sysProp)) {
+ arrayBuf += (optionName, sc.getConf.get(sysProp))
}
}