You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by pw...@apache.org on 2015/01/12 20:58:09 UTC

spark git commit: [SPARK-5078] Optionally read from SPARK_LOCAL_HOSTNAME

Repository: spark
Updated Branches:
  refs/heads/master 13e610b88 -> a3978f3e1


[SPARK-5078] Optionally read from SPARK_LOCAL_HOSTNAME

Current spark lets you set the ip address using SPARK_LOCAL_IP, but then this is given to akka after doing a reverse DNS lookup. This makes it difficult to run spark in Docker. You can already change the hostname that is used programmatically, but it would be nice to be able to do this with an environment variable as well.

Author: Michael Armbrust <mi...@databricks.com>

Closes #3893 from marmbrus/localHostnameEnv and squashes the following commits:

85045b6 [Michael Armbrust] Optionally read from SPARK_LOCAL_HOSTNAME


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

Branch: refs/heads/master
Commit: a3978f3e156e0ca67e978f1795b238ddd69ff9a6
Parents: 13e610b
Author: Michael Armbrust <mi...@databricks.com>
Authored: Mon Jan 12 11:57:59 2015 -0800
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Mon Jan 12 11:57:59 2015 -0800

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/util/Utils.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/a3978f3e/core/src/main/scala/org/apache/spark/util/Utils.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala b/core/src/main/scala/org/apache/spark/util/Utils.scala
index c4f1898..578f1a9 100644
--- a/core/src/main/scala/org/apache/spark/util/Utils.scala
+++ b/core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -701,7 +701,7 @@ private[spark] object Utils extends Logging {
     }
   }
 
-  private var customHostname: Option[String] = None
+  private var customHostname: Option[String] = sys.env.get("SPARK_LOCAL_HOSTNAME")
 
   /**
    * Allow setting a custom host name because when we run on Mesos we need to use the same


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