Repository: spark Updated Branches: refs/heads/branch-1.0 666bebe63 -> 7e1933451
[SPARK-1631] Correctly set the Yarn app name when launching the AM. Author: Marcelo Vanzin <[email protected]> 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 <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/7e193345 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/7e193345 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/7e193345 Branch: refs/heads/branch-1.0 Commit: 7e1933451cde2c8f878fc6f39b862f5636586d6a Parents: 666bebe Author: Marcelo Vanzin <[email protected]> Authored: Thu May 8 20:46:11 2014 -0700 Committer: Patrick Wendell <[email protected]> Committed: Thu May 8 20:46:19 2014 -0700 ---------------------------------------------------------------------- .../spark/scheduler/cluster/YarnClientSchedulerBackend.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/7e193345/yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala ---------------------------------------------------------------------- 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 ce2dde0..2924189 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)) } }
