Repository: spark
Updated Branches:
  refs/heads/master 8b7841299 -> 3f779d872


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


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/3f779d87
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/3f779d87
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/3f779d87

Branch: refs/heads/master
Commit: 3f779d872d8459b262b3db9e4d12b011910b6ce9
Parents: 8b78412
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:11 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/3f779d87/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))
     }
   }
 

Reply via email to