Skip to content

Instantly share code, notes, and snippets.

@cpwais
Created June 20, 2016 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpwais/611dff495f2b4bd8ee1813acfe2d122f to your computer and use it in GitHub Desktop.
Save cpwais/611dff495f2b4bd8ee1813acfe2d122f to your computer and use it in GitHub Desktop.
diff --git a/core/common/src/main/java/alluxio/util/network/NetworkAddressUtils.java b/core/common/src/main/java/alluxio/util/network/NetworkAddressUtils.java
index 4ac5e44..8aa0e86 100644
--- a/core/common/src/main/java/alluxio/util/network/NetworkAddressUtils.java
+++ b/core/common/src/main/java/alluxio/util/network/NetworkAddressUtils.java
@@ -356,6 +356,13 @@ public final class NetworkAddressUtils {
return sLocalIP;
}
+ String override = System.getenv("ALLUXIO_HOST_IP");
+ if (override != null) {
+ sLocalIP = override;
+ LOG.debug("using override {}", sLocalIP);
+ return sLocalIP;
+ }
+
try {
InetAddress address = InetAddress.getLocalHost();
LOG.debug("address: {} isLoopbackAddress: {}, with host {} {}", address,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment