Skip to content
Snippets Groups Projects
Commit 3f779d87 authored by Marcelo Vanzin's avatar Marcelo Vanzin Committed by Patrick Wendell
Browse files

[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.
parent 8b784129
No related branches found
No related tags found
No related merge requests found
...@@ -35,10 +35,10 @@ private[spark] class YarnClientSchedulerBackend( ...@@ -35,10 +35,10 @@ private[spark] class YarnClientSchedulerBackend(
private[spark] def addArg(optionName: String, envVar: String, sysProp: String, private[spark] def addArg(optionName: String, envVar: String, sysProp: String,
arrayBuf: ArrayBuffer[String]) { arrayBuf: ArrayBuffer[String]) {
if (System.getProperty(sysProp) != null) { if (System.getenv(envVar) != null) {
arrayBuf += (optionName, System.getProperty(sysProp))
} else if (System.getenv(envVar) != null) {
arrayBuf += (optionName, System.getenv(envVar)) arrayBuf += (optionName, System.getenv(envVar))
} else if (sc.getConf.contains(sysProp)) {
arrayBuf += (optionName, sc.getConf.get(sysProp))
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment