Skip to content
Snippets Groups Projects
Commit a646a365 authored by Andrew Or's avatar Andrew Or Committed by Patrick Wendell
Browse files

[SPARK-2857] Correct properties to set Master / Worker ports

`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
parent 4fde28c2
No related branches found
No related tags found
No related merge requests found
...@@ -38,8 +38,8 @@ private[spark] class MasterArguments(args: Array[String], conf: SparkConf) { ...@@ -38,8 +38,8 @@ private[spark] class MasterArguments(args: Array[String], conf: SparkConf) {
if (System.getenv("SPARK_MASTER_WEBUI_PORT") != null) { if (System.getenv("SPARK_MASTER_WEBUI_PORT") != null) {
webUiPort = System.getenv("SPARK_MASTER_WEBUI_PORT").toInt webUiPort = System.getenv("SPARK_MASTER_WEBUI_PORT").toInt
} }
if (conf.contains("master.ui.port")) { if (conf.contains("spark.master.ui.port")) {
webUiPort = conf.get("master.ui.port").toInt webUiPort = conf.get("spark.master.ui.port").toInt
} }
parse(args.toList) parse(args.toList)
......
...@@ -58,6 +58,6 @@ private[spark] object WorkerWebUI { ...@@ -58,6 +58,6 @@ private[spark] object WorkerWebUI {
val STATIC_RESOURCE_BASE = SparkUI.STATIC_RESOURCE_DIR val STATIC_RESOURCE_BASE = SparkUI.STATIC_RESOURCE_DIR
def getUIPort(requestedPort: Option[Int], conf: SparkConf): Int = { 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))
} }
} }
...@@ -314,7 +314,7 @@ configure those ports. ...@@ -314,7 +314,7 @@ configure those ports.
<td>Standalone Cluster Master</td> <td>Standalone Cluster Master</td>
<td>8080</td> <td>8080</td>
<td>Web UI</td> <td>Web UI</td>
<td><code>master.ui.port</code></td> <td><code>spark.master.ui.port</code></td>
<td>Jetty-based</td> <td>Jetty-based</td>
</tr> </tr>
<tr> <tr>
...@@ -338,7 +338,7 @@ configure those ports. ...@@ -338,7 +338,7 @@ configure those ports.
<td>Worker</td> <td>Worker</td>
<td>8081</td> <td>8081</td>
<td>Web UI</td> <td>Web UI</td>
<td><code>worker.ui.port</code></td> <td><code>spark.worker.ui.port</code></td>
<td>Jetty-based</td> <td>Jetty-based</td>
</tr> </tr>
<!-- Cluster interactions --> <!-- Cluster interactions -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment