Skip to content

Commit 3f779d8

Browse files
Marcelo Vanzinpwendell
authored andcommitted
[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.
1 parent 8b78412 commit 3f779d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ private[spark] class YarnClientSchedulerBackend(
3535

3636
private[spark] def addArg(optionName: String, envVar: String, sysProp: String,
3737
arrayBuf: ArrayBuffer[String]) {
38-
if (System.getProperty(sysProp) != null) {
39-
arrayBuf += (optionName, System.getProperty(sysProp))
40-
} else if (System.getenv(envVar) != null) {
38+
if (System.getenv(envVar) != null) {
4139
arrayBuf += (optionName, System.getenv(envVar))
40+
} else if (sc.getConf.contains(sysProp)) {
41+
arrayBuf += (optionName, sc.getConf.get(sysProp))
4242
}
4343
}
4444

0 commit comments

Comments
 (0)