Skip to content

Commit

Permalink
Built correct URL for worker web UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcelo Vanzin committed Jan 4, 2016
1 parent 620f56e commit 6840eee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ private[deploy] class Worker(
shuffleService.startIfEnabled()
webUi = new WorkerWebUI(this, workDir, webUiPort)
webUi.bind()
workerWebUiUrl = s"http://$publicAddress:${webUi.boundPort}"

val scheme = if (webUi.sslOptions.enabled) "https" else "http"
workerWebUiUrl = s"$scheme://$publicAddress:${webUi.boundPort}"
registerWithMaster()

metricsSystem.registerSource(workerSource)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/org/apache/spark/ui/WebUI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import org.apache.spark.util.Utils
*/
private[spark] abstract class WebUI(
val securityManager: SecurityManager,
sslOptions: SSLOptions,
val sslOptions: SSLOptions,
port: Int,
conf: SparkConf,
basePath: String = "",
Expand Down

0 comments on commit 6840eee

Please sign in to comment.