Skip to content

Commit

Permalink
[SPARK-2857] Correct properties to set Master / Worker ports
Browse files Browse the repository at this point in the history
`master.ui.port` and `worker.ui.port` were never picked up by SparkConf, simply because they are not prefixed with "spark." Unfortunately, this is also currently the documented way of setting these values.

Author: Andrew Or <andrewor14@gmail.com>

Closes #1779 from andrewor14/master-worker-port and squashes the following commits:

8475e95 [Andrew Or] Update docs to reflect changes in configs
4db3d5d [Andrew Or] Stop using configs that don't actually work
(cherry picked from commit a646a36)

Signed-off-by: Patrick Wendell <pwendell@gmail.com>
  • Loading branch information
andrewor14 authored and pwendell committed Aug 5, 2014
1 parent d13d253 commit 12f99cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ private[spark] class MasterArguments(args: Array[String], conf: SparkConf) {
if (System.getenv("SPARK_MASTER_WEBUI_PORT") != null) {
webUiPort = System.getenv("SPARK_MASTER_WEBUI_PORT").toInt
}
if (conf.contains("master.ui.port")) {
webUiPort = conf.get("master.ui.port").toInt
if (conf.contains("spark.master.ui.port")) {
webUiPort = conf.get("spark.master.ui.port").toInt
}

parse(args.toList)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ private[spark] object WorkerWebUI {
val STATIC_RESOURCE_BASE = SparkUI.STATIC_RESOURCE_DIR

def getUIPort(requestedPort: Option[Int], conf: SparkConf): Int = {
requestedPort.getOrElse(conf.getInt("worker.ui.port", WorkerWebUI.DEFAULT_PORT))
requestedPort.getOrElse(conf.getInt("spark.worker.ui.port", WorkerWebUI.DEFAULT_PORT))
}
}
4 changes: 2 additions & 2 deletions docs/spark-standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ configure those ports.
<td>Standalone Cluster Master</td>
<td>8080</td>
<td>Web UI</td>
<td><code>master.ui.port</code></td>
<td><code>spark.master.ui.port</code></td>
<td>Jetty-based</td>
</tr>
<tr>
Expand All @@ -338,7 +338,7 @@ configure those ports.
<td>Worker</td>
<td>8081</td>
<td>Web UI</td>
<td><code>worker.ui.port</code></td>
<td><code>spark.worker.ui.port</code></td>
<td>Jetty-based</td>
</tr>
<!-- Cluster interactions -->
Expand Down

0 comments on commit 12f99cf

Please sign in to comment.