Skip to content

Commit a646a36

Browse files
andrewor14pwendell
authored andcommitted
[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 <[email protected]> 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
1 parent 4fde28c commit a646a36

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

core/src/main/scala/org/apache/spark/deploy/master/MasterArguments.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ private[spark] class MasterArguments(args: Array[String], conf: SparkConf) {
3838
if (System.getenv("SPARK_MASTER_WEBUI_PORT") != null) {
3939
webUiPort = System.getenv("SPARK_MASTER_WEBUI_PORT").toInt
4040
}
41-
if (conf.contains("master.ui.port")) {
42-
webUiPort = conf.get("master.ui.port").toInt
41+
if (conf.contains("spark.master.ui.port")) {
42+
webUiPort = conf.get("spark.master.ui.port").toInt
4343
}
4444

4545
parse(args.toList)

core/src/main/scala/org/apache/spark/deploy/worker/ui/WorkerWebUI.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ private[spark] object WorkerWebUI {
5858
val STATIC_RESOURCE_BASE = SparkUI.STATIC_RESOURCE_DIR
5959

6060
def getUIPort(requestedPort: Option[Int], conf: SparkConf): Int = {
61-
requestedPort.getOrElse(conf.getInt("worker.ui.port", WorkerWebUI.DEFAULT_PORT))
61+
requestedPort.getOrElse(conf.getInt("spark.worker.ui.port", WorkerWebUI.DEFAULT_PORT))
6262
}
6363
}

docs/spark-standalone.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ configure those ports.
314314
<td>Standalone Cluster Master</td>
315315
<td>8080</td>
316316
<td>Web UI</td>
317-
<td><code>master.ui.port</code></td>
317+
<td><code>spark.master.ui.port</code></td>
318318
<td>Jetty-based</td>
319319
</tr>
320320
<tr>
@@ -338,7 +338,7 @@ configure those ports.
338338
<td>Worker</td>
339339
<td>8081</td>
340340
<td>Web UI</td>
341-
<td><code>worker.ui.port</code></td>
341+
<td><code>spark.worker.ui.port</code></td>
342342
<td>Jetty-based</td>
343343
</tr>
344344
<!-- Cluster interactions -->

0 commit comments

Comments
 (0)