You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by va...@apache.org on 2018/03/23 17:36:32 UTC

spark git commit: [SPARK-23759][UI] Unable to bind Spark UI to specific host name / IP

Repository: spark
Updated Branches:
  refs/heads/master 6ac4fba69 -> 8b56f1664


[SPARK-23759][UI] Unable to bind Spark UI to specific host name / IP

## What changes were proposed in this pull request?

Fixes SPARK-23759 by moving connector.start() after connector.setHost()

Problem was created due connector.setHost(hostName) call was after connector.start()

## How was this patch tested?

Patch was tested after build and deployment. This patch requires SPARK_LOCAL_IP environment variable to be set on spark-env.sh

Author: bag_of_tricks <fa...@hortonworks.com>

Closes #20883 from felixalbani/SPARK-23759.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/8b56f166
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/8b56f166
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/8b56f166

Branch: refs/heads/master
Commit: 8b56f16640fc4156aa7bd529c54469d27635b951
Parents: 6ac4fba
Author: bag_of_tricks <fa...@hortonworks.com>
Authored: Fri Mar 23 10:36:23 2018 -0700
Committer: Marcelo Vanzin <va...@cloudera.com>
Committed: Fri Mar 23 10:36:23 2018 -0700

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/ui/JettyUtils.scala | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/8b56f166/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala b/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
index 0adeb40..0e8a630 100644
--- a/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
+++ b/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala
@@ -343,12 +343,13 @@ private[spark] object JettyUtils extends Logging {
           -1,
           connectionFactories: _*)
         connector.setPort(port)
-        connector.start()
+        connector.setHost(hostName)
 
         // Currently we only use "SelectChannelConnector"
         // Limit the max acceptor number to 8 so that we don't waste a lot of threads
         connector.setAcceptQueueSize(math.min(connector.getAcceptors, 8))
-        connector.setHost(hostName)
+
+        connector.start()
         // The number of selectors always equals to the number of acceptors
         minThreads += connector.getAcceptors * 2
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org