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

Merge pull request #304 from mbautin/configurable_local_ip

SPARK-624: make the default local IP customizable
parents 20a1058d 00f4e3ff
No related branches found
No related tags found
No related merge requests found
......@@ -199,7 +199,13 @@ private object Utils extends Logging {
/**
* Get the local host's IP address in dotted-quad format (e.g. 1.2.3.4).
*/
def localIpAddress(): String = InetAddress.getLocalHost.getHostAddress
def localIpAddress(): String = {
val defaultIpOverride = System.getenv("SPARK_LOCAL_IP")
if (defaultIpOverride != null)
defaultIpOverride
else
InetAddress.getLocalHost.getHostAddress
}
private var customHostname: Option[String] = None
......
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