diff options
author | Marcelo Vanzin <vanzin@cloudera.com> | 2014-05-08 20:46:11 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-05-08 20:46:19 -0700 |
commit | 7e1933451cde2c8f878fc6f39b862f5636586d6a (patch) | |
tree | 1fcbf5a90a272f5162967aff6b6e4e1c0cb12bd2 /yarn | |
parent | 666bebe63ef30be80dd1496e5f9164dd4cdb2016 (diff) | |
download | spark-7e1933451cde2c8f878fc6f39b862f5636586d6a.tar.gz spark-7e1933451cde2c8f878fc6f39b862f5636586d6a.tar.bz2 spark-7e1933451cde2c8f878fc6f39b862f5636586d6a.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.
(cherry picked from commit 3f779d872d8459b262b3db9e4d12b011910b6ce9)
Signed-off-by: Patrick Wendell <pwendell@gmail.com>
Diffstat (limited to 'yarn')
-rw-r--r-- | yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala | 6 |
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)) } } |