You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "steveloughran (via GitHub)" <gi...@apache.org> on 2023/02/13 13:39:26 UTC

[GitHub] [hadoop] steveloughran commented on a diff in pull request #5385: HADOOP-18628. Server connection should log host name before returning VersionMismatch error

steveloughran commented on code in PR #5385:
URL: https://github.com/apache/hadoop/pull/5385#discussion_r1104483880


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java:
##########
@@ -2033,8 +2034,12 @@ public Connection(SocketChannel channel, long lastContact,
       this.isOnAuxiliaryPort = isOnAuxiliaryPort;
       if (addr == null) {
         this.hostAddress = "*Unknown*";
+        this.hostName = this.hostAddress;

Review Comment:
   use NetUtils.getHostNameOfIP() and similar for all this. gives us one point of maintenance, testing, upgrading to ipv6 etc



-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org