This is an automated email from the ASF dual-hosted git repository.

magang pushed a commit to branch realtime-streaming
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/realtime-streaming by this 
push:
     new 6bb8155  KYLIN-3747 Use FQDN to register a streaming receiver instead 
of ip
6bb8155 is described below

commit 6bb8155cd1652e5d114d39735fd0920d0163e035
Author: Ma,Gang <ga...@ebay.com>
AuthorDate: Fri Dec 28 18:06:55 2018 +0800

    KYLIN-3747 Use FQDN to register a streaming receiver instead of ip
---
 .../src/main/java/org/apache/kylin/stream/core/util/NodeUtil.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/stream-core/src/main/java/org/apache/kylin/stream/core/util/NodeUtil.java 
b/stream-core/src/main/java/org/apache/kylin/stream/core/util/NodeUtil.java
index ae3c390..1861144 100644
--- a/stream-core/src/main/java/org/apache/kylin/stream/core/util/NodeUtil.java
+++ b/stream-core/src/main/java/org/apache/kylin/stream/core/util/NodeUtil.java
@@ -45,14 +45,14 @@ public class NodeUtil {
     }
 
     private static String getLocalhostName() {
-        String ip;
+        String host;
         try {
             InetAddress addr = InetAddress.getLocalHost();
-            ip = addr.getHostAddress();
+            host = addr.getCanonicalHostName();
         } catch (UnknownHostException e) {
             logger.error("Fail to get local ip address", e);
-            ip = "UNKNOWN";
+            host = "UNKNOWN";
         }
-        return ip;
+        return host;
     }
 }

Reply via email to