aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/org/apache/spark/ui/UIUtils.scala12
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 = {