Skip to content

Commit

Permalink
[SPARK-45095][CORE] Support spark.master.rest.host
Browse files Browse the repository at this point in the history
  • Loading branch information
dongjoon-hyun committed Sep 6, 2023
1 parent 0777562 commit 70446fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ private[deploy] class Master(

if (restServerEnabled) {
val port = conf.get(MASTER_REST_SERVER_PORT)
restServer = Some(new StandaloneRestServer(address.host, port, conf, self, masterUrl))
val host = conf.get(MASTER_REST_SERVER_HOST).getOrElse(address.host)
restServer = Some(new StandaloneRestServer(host, port, conf, self, masterUrl))
}
restServerBoundPort = restServer.map(_.start())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1828,6 +1828,11 @@ package object config {
.booleanConf
.createWithDefault(false)

private[spark] val MASTER_REST_SERVER_HOST = ConfigBuilder("spark.master.rest.host")
.version("4.0.0")
.stringConf
.createOptional

private[spark] val MASTER_REST_SERVER_PORT = ConfigBuilder("spark.master.rest.port")
.version("1.3.0")
.intConf
Expand Down

0 comments on commit 70446fb

Please sign in to comment.