diff options
author | Srinivasa Reddy Vundela <vsr@cloudera.com> | 2015-11-05 11:30:44 -0800 |
---|---|---|
committer | Marcelo Vanzin <vanzin@cloudera.com> | 2015-11-05 11:30:44 -0800 |
commit | c76865c6220e3e7b2a266bbc4935567ef55303d8 (patch) | |
tree | 2d2beacbd90ecdc12b7e2e0cd2d45409811ad5ed /core/src/main | |
parent | 9da7ceed81b0afce7deb8f39f3a6d565d401a391 (diff) | |
download | spark-c76865c6220e3e7b2a266bbc4935567ef55303d8.tar.gz spark-c76865c6220e3e7b2a266bbc4935567ef55303d8.tar.bz2 spark-c76865c6220e3e7b2a266bbc4935567ef55303d8.zip |
[SPARK-11484][WEBUI] Using proxyBase set by spark AM
Use the proxyBase set by the AM, if not found then use env. This is to fix the issue if somebody accidentally set APPLICATION_WEB_PROXY_BASE to wrong proxyBase
Author: Srinivasa Reddy Vundela <vsr@cloudera.com>
Closes #9448 from vundela/master.
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/scala/org/apache/spark/ui/UIUtils.scala | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/core/src/main/scala/org/apache/spark/ui/UIUtils.scala b/core/src/main/scala/org/apache/spark/ui/UIUtils.scala index 68a9f912a5..25dcb604d9 100644 --- a/core/src/main/scala/org/apache/spark/ui/UIUtils.scala +++ b/core/src/main/scala/org/apache/spark/ui/UIUtils.scala @@ -143,14 +143,10 @@ private[spark] object UIUtils extends Logging { // Yarn has to go through a proxy so the base uri is provided and has to be on all links def uiRoot: String = { - if (System.getenv("APPLICATION_WEB_PROXY_BASE") != null) { - System.getenv("APPLICATION_WEB_PROXY_BASE") - } else if (System.getProperty("spark.ui.proxyBase") != null) { - System.getProperty("spark.ui.proxyBase") - } - else { - "" - } + // SPARK-11484 - Use the proxyBase set by the AM, if not found then use env. + sys.props.get("spark.ui.proxyBase") + .orElse(sys.env.get("APPLICATION_WEB_PROXY_BASE")) + .getOrElse("") } def prependBaseUri(basePath: String = "", resource: String = ""): String = { |