[
https://issues.apache.org/jira/browse/HADOOP-8210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13243597#comment-13243597
]
Todd Lipcon commented on HADOOP-8210:
-------------------------------------
{code}
+ LinkedHashSet<InetAddress> addrs = new LinkedHashSet<InetAddress>();
{code}
I think it's worth changing the return type of this function to LinkedHashSet,
so it's clear that the ordering here is on purpose. Perhaps also add a comment
here saying something like:
{code}
// See below for reasoning behind using an ordered set.
{code}
----
{code}
+ // that depend on a particular element being 1st in the array.
+ // Eg. getDefaultIP always returns the 1st element.
{code}
Nits: please un-abbreviate "first" for better readability. Also, "e.g." instead
of "Eg." -- or just say "For example"
----
{code}
+ ips[i] = addr.getHostAddress();
+ i++;
{code}
I think it's more idiomatic to just put the postincrement inside the []s
----
- there's a small spurious whitespace change in NetUtils.java
- looks like the pom change is still in this patch (redundant with HADOOP-8211)
> Common side of HDFS-3148
> ------------------------
>
> Key: HADOOP-8210
> URL: https://issues.apache.org/jira/browse/HADOOP-8210
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: io, performance
> Reporter: Eli Collins
> Assignee: Eli Collins
> Attachments: hadoop-8210.txt
>
>
> Common side of HDFS-3148, add necessary DNS and NetUtils methods. Test
> coverage is in the HDFS-3148 patch.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira