aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorAndrew Or <andrewor14@gmail.com>2014-08-05 00:39:07 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-08-05 00:39:07 -0700
commita646a365e3beb8d0cd7e492e625ce68ee9439a07 (patch)
treef3c5ee29f72f8086e2d93e503fab1ede8abe9e79 /core
parent4fde28c2063f673ec7f51d514ba62a73321960a1 (diff)
downloadspark-a646a365e3beb8d0cd7e492e625ce68ee9439a07.tar.gz
spark-a646a365e3beb8d0cd7e492e625ce68ee9439a07.tar.bz2
spark-a646a365e3beb8d0cd7e492e625ce68ee9439a07.zip
[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
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/org/apache/spark/deploy/master/MasterArguments.scala4
-rw-r--r--core/src/main/scala/org/apache/spark/deploy/worker/ui/WorkerWebUI.scala2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/master/MasterArguments.scala b/core/src/main/scala/org/apache/spark/deploy/master/MasterArguments.scala
index a87781fb93..4b0dbbe543 100644
--- a/core/src/main/scala/org/apache/spark/deploy/master/MasterArguments.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/master/MasterArguments.scala
@@ -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)
diff --git a/core/src/main/scala/org/apache/spark/deploy/worker/ui/WorkerWebUI.scala b/core/src/main/scala/org/apache/spark/deploy/worker/ui/WorkerWebUI.scala
index 0ad2edba22..a9f531e9e4 100644
--- a/core/src/main/scala/org/apache/spark/deploy/worker/ui/WorkerWebUI.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/worker/ui/WorkerWebUI.scala
@@ -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))
}
}