Skip to content
Snippets Groups Projects
Commit 15fb3948 authored by Matei Zaharia's avatar Matei Zaharia
Browse files

Merge pull request #716 from c0s/webui-port

Regression: default webui-port can't be set via command line "--webui-port" anymore
parents c40f0f21 cfce9a6a
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,7 @@ private[spark] class Master(host: String, port: Int, webUiPort: Int) extends Act
var firstApp: Option[ApplicationInfo] = None
val webUi = new MasterWebUI(self)
val webUi = new MasterWebUI(self, webUiPort)
Utils.checkHost(host, "Expected hostname")
......
......@@ -38,7 +38,10 @@ private[spark] class MasterArguments(args: Array[String]) {
if (System.getenv("SPARK_MASTER_WEBUI_PORT") != null) {
webUiPort = System.getenv("SPARK_MASTER_WEBUI_PORT").toInt
}
if (System.getProperty("master.ui.port") != null) {
webUiPort = System.getProperty("master.ui.port").toInt
}
parse(args.toList)
def parse(args: List[String]): Unit = args match {
......
......@@ -32,12 +32,11 @@ import spark.ui.JettyUtils._
* Web UI server for the standalone master.
*/
private[spark]
class MasterWebUI(val master: ActorRef, requestedPort: Option[Int] = None) extends Logging {
class MasterWebUI(val master: ActorRef, requestedPort: Int) extends Logging {
implicit val timeout = Duration.create(
System.getProperty("spark.akka.askTimeout", "10").toLong, "seconds")
val host = Utils.localHostName()
val port = requestedPort.getOrElse(
System.getProperty("master.ui.port", MasterWebUI.DEFAULT_PORT).toInt)
val port = requestedPort
var server: Option[Server] = None
var boundPort: Option[Int] = None
......@@ -72,5 +71,4 @@ class MasterWebUI(val master: ActorRef, requestedPort: Option[Int] = None) exten
private[spark] object MasterWebUI {
val STATIC_RESOURCE_DIR = "spark/ui/static"
val DEFAULT_PORT = "8080"
}
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