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

Dr. Martin Menzel commented on HADOOP-3619:
-------------------------------------------

Regarding the DNS request to an external host there are several possibilities 
to keep things local:

1) If we have possibilities to access  a local DNS server with test ipv6 
entries set, I can use this server. To do this I would need the the test ipv6 
entries to be used for the tests. Of course such tests are also not very 
isolated and are a bit more of type integration testing. On the other hand this 
is the advantage that we are sure to make real world tests.

2) I can try to create some kind of DNS tests with an embedded DNS server 
implemented in java. This way the tests are very good isolated from other 
servers (i.e. bind server etc.) but the test case with the dnsd mock will get 
very big.

-----------

Regarding the other comments:

* Exception message: I can change this.

* tabs / style: I can change this.

* private methods: I be honest, I don't like private methods at all. The reason 
is, that I found very often useful methods/code in open source software classes 
which would fit perfect to solve a problem --- apart from the keyword private. 
As a consequence I had to fork the project, adapt the private keyword or 
generate duplicate lines of code.

* annotation for test: I will change this.

* AssertEquals order of arguments: I will change this.

* negative tests: How can we control that some tests are running on a server 
with IPv6 enabled and others on a server with IPv6 disabled? Any ideas how to 
implement this?

> 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: BB2015-05-TBR, 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)

Reply via email to