kgyrtkirk commented on a change in pull request #2314:
URL: https://github.com/apache/hive/pull/2314#discussion_r638858915



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ZooKeeperHiveLockManager.java
##########
@@ -65,16 +66,7 @@
   private int numRetriesForLock;
   private int numRetriesForUnLock;
 
-  private static String clientIp;
-
-  static {
-    clientIp = "UNKNOWN";
-    try {
-      InetAddress clientAddr = InetAddress.getLocalHost();
-      clientIp = clientAddr.getHostAddress();
-    } catch (Exception e1) {
-    }
-  }
+  private static String clientIp = 
ServerUtils.hostname(Optional.of("UNKNOWN"));

Review comment:
       old implementation was resolving an IP while this will be a hostname...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to