Skip to content
Snippets Groups Projects
Commit 1f5a7e0e authored by mbautin's avatar mbautin
Browse files

SPARK-624: make the default local IP customizable

parent c23a74df
No related branches found
No related tags found
No related merge requests found
...@@ -199,7 +199,13 @@ private object Utils extends Logging { ...@@ -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). * 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_DEFAULT_LOCAL_IP")
if (defaultIpOverride != null)
defaultIpOverride
else
InetAddress.getLocalHost.getHostAddress
}
private var customHostname: Option[String] = None 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