[
https://issues.apache.org/jira/browse/HADOOP-3619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14310878#comment-14310878
]
Steve Loughran commented on HADOOP-3619:
----------------------------------------
-1 as is, though with a couple of iterations it should be ready to go in.
h3. production code
# no need to explicitly use {{java.net.Inet4Address}} &
{{java.net.Inet6Address}}; they are imported & can be used directly.
# recommend: the naming exception to include a link to new hadoop wiki entry
(ideally https://wiki.apache.org/hadoop/DNS) which we can expand to cover DNS
issues for those users who don't know anything about them.
# the new ipv4/ipv6 methods should be private.
# {{getNibbleFromAddress()}} should be package scoped, tagged
{{@VisibleForTesting}}, and have a test which that the example result comes
from the example input. Given that there's no way to create a stub IPv6
address, the bytes->string generation logic could be pulled out and tested
standalone.
h3. Test case
# {{assertEquals()}} comparators are inverted: expected value comes first.
# We can't have tests that expect the external network to be there, not even
DNS. Is there a way to test this such that only localhost DNS lookup is needed?
# what happens to these tests on machines without IPv6 support? It's not
directly a test failure, just a machine/network configuration. The test needs
to recognise and handle this situation.
General
* hadoop style guide is 2 chars, no tabs, amongst other things.
see
https://github.com/steveloughran/formality/blob/master/styleguide/styleguide.md
for a side project of mine to document what is generally expected.
> 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
> Components: net
> Reporter: Steve Loughran
> Assignee: Dr. Martin Menzel
> Labels: ipv6, 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.3.4#6332)