Repository: spark
Updated Branches:
  refs/heads/branch-2.0 7fbb07372 -> 44df6d2ce


[SPARK-18762][WEBUI] Web UI should be http:4040 instead of https:4040

## What changes were proposed in this pull request?

When SSL is enabled, the Spark shell shows:
```
Spark context Web UI available at https://192.168.99.1:4040
```
This is wrong because 4040 is http, not https. It redirects to the https port.
More importantly, this introduces several broken links in the UI. For example, 
in the master UI, the worker link is https:8081 instead of http:8081 or 
https:8481.

CC: mengxr liancheng

I manually tested accessing by accessing MasterPage, WorkerPage and 
HistoryServer with SSL enabled.

Author: sarutak <saru...@oss.nttdata.co.jp>

Closes #16190 from sarutak/SPARK-18761.

(cherry picked from commit bb94f61a7ac97bf904ec0e8d5a4ab69a4142443f)
Signed-off-by: Marcelo Vanzin <van...@cloudera.com>


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

Branch: refs/heads/branch-2.0
Commit: 44df6d2ce9b9fee087efd18f9f72b2bed89b4223
Parents: 7fbb073
Author: sarutak <saru...@oss.nttdata.co.jp>
Authored: Wed Dec 7 11:41:23 2016 -0800
Committer: Marcelo Vanzin <van...@cloudera.com>
Committed: Wed Dec 7 11:44:20 2016 -0800

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala | 3 +--
 core/src/main/scala/org/apache/spark/ui/WebUI.scala             | 5 +----
 2 files changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/44df6d2c/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala 
b/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
index 724206b..5bd32b2 100755
--- a/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
@@ -187,8 +187,7 @@ private[deploy] class Worker(
     webUi = new WorkerWebUI(this, workDir, webUiPort)
     webUi.bind()
 
-    val scheme = if (webUi.sslOptions.enabled) "https" else "http"
-    workerWebUiUrl = s"$scheme://$publicAddress:${webUi.boundPort}"
+    workerWebUiUrl = s"http://$publicAddress:${webUi.boundPort}";
     registerWithMaster()
 
     metricsSystem.registerSource(workerSource)

http://git-wip-us.apache.org/repos/asf/spark/blob/44df6d2c/core/src/main/scala/org/apache/spark/ui/WebUI.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/ui/WebUI.scala 
b/core/src/main/scala/org/apache/spark/ui/WebUI.scala
index adc4a4f..2c40e72 100644
--- a/core/src/main/scala/org/apache/spark/ui/WebUI.scala
+++ b/core/src/main/scala/org/apache/spark/ui/WebUI.scala
@@ -146,10 +146,7 @@ private[spark] abstract class WebUI(
   }
 
   /** Return the url of web interface. Only valid after bind(). */
-  def webUrl: String = {
-    val protocol = if (sslOptions.enabled) "https" else "http"
-    s"$protocol://$publicHostName:$boundPort"
-  }
+  def webUrl: String = s"http://$publicHostName:$boundPort";
 
   /** Return the actual port to which this server is bound. Only valid after 
bind(). */
   def boundPort: Int = serverInfo.map(_.boundPort).getOrElse(-1)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to