snmvaughan commented on code in PR #4693:
URL: https://github.com/apache/hadoop/pull/4693#discussion_r945856788


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/DNSDomainNameResolver.java:
##########
@@ -40,6 +48,16 @@ public String getHostnameByIP(InetAddress address) {
         && host.charAt(host.length()-1) == '.') {
       host = host.substring(0, host.length()-1);
     }
+    // Protect against the Java behaviour of returning the IP address as a 
string from a cache
+    // instead of performing a reverse lookup.
+    if (host.equals(address.getHostAddress())) {

Review Comment:
   It either returns what it figured out, or returns the IP address as a 
string.  There is no way of knowing when it is failing to provide an actual 
FQDN, which is why there is the additional check to see if it is just the IP 
address.



-- 
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.

To unsubscribe, e-mail: [email protected]

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