[ 
https://issues.apache.org/jira/browse/HADOOP-3619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14066506#comment-14066506
 ] 

Allen Wittenauer commented on HADOOP-3619:
------------------------------------------

A few comments:

* I'm not a big fan of this error message:

bq. +                       throw new NamingException("hostIp is not 
Inet4Address or Inet6Address. Other Addresses are not supported actually");

Perhaps it should be "Unrecognized IP address format: xyz", where xyz is the 
address we couldn't parse?

* It might be a good idea to see if this code throws an exception when given a 
broken address format in the test.  (I'm a big fan of negative tests!)

* What happens on a machine with IPv6 disabled?  Do the tests still pass?

* I'm a little uncomfortable doing DNS tests against an actual host.  It looks 
like the test code for IPv4 is looking at localhost.  We should probably do the 
same thing for IPv6.

> DNS.getHosts triggers an ArrayIndexOutOfBoundsException in reverseDNS if one 
> of the interfaces is IPv6
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-3619
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3619
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Steve Loughran
>              Labels: patch
>         Attachments: HADOOP-3619-v2.patch
>
>
> reverseDNS tries to split a host address string by ".", and so fails if ":" 
> is the separator, as it is in IPv6. When it tries to access the parts of the 
> address, a stack trace is seen.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to