HADOOP-9099. NetUtils.normalizeHostName fails on domains where UnknownHost resolves to an IP address. Contributed by Ivan Mitic.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1455629 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2013-03-12 17:11:35 +00:00
parent d49c50732e
commit ebf2e6b363
2 changed files with 7 additions and 1 deletions

View File

@ -345,6 +345,9 @@ Trunk (Unreleased)
HADOOP-9394. Port findHangingTest.sh from HBase to Hadoop. (Andrew Wang HADOOP-9394. Port findHangingTest.sh from HBase to Hadoop. (Andrew Wang
via atm) via atm)
HADOOP-9099. NetUtils.normalizeHostName fails on domains where
UnknownHost resolves to an IP address. (Ivan Mitic via suresh)
OPTIMIZATIONS OPTIMIZATIONS
HADOOP-7761. Improve the performance of raw comparisons. (todd) HADOOP-7761. Improve the performance of raw comparisons. (todd)
@ -473,6 +476,9 @@ Trunk (Unreleased)
HADOOP-9364. PathData#expandAsGlob does not return correct results for HADOOP-9364. PathData#expandAsGlob does not return correct results for
absolute paths on Windows. (Ivan Mitic via suresh) absolute paths on Windows. (Ivan Mitic via suresh)
HADOOP-8973. DiskChecker cannot reliably detect an inaccessible disk on
Windows with NTFS ACLs. (Chris Nauroth via suresh)
Release 2.0.5-beta - UNRELEASED Release 2.0.5-beta - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -605,7 +605,7 @@ public class TestNetUtils {
@Test @Test
public void testNormalizeHostName() { public void testNormalizeHostName() {
List<String> hosts = Arrays.asList(new String[] {"127.0.0.1", List<String> hosts = Arrays.asList(new String[] {"127.0.0.1",
"localhost", "3w.org", "UnknownHost"}); "localhost", "3w.org", "UnknownHost123"});
List<String> normalizedHosts = NetUtils.normalizeHostNames(hosts); List<String> normalizedHosts = NetUtils.normalizeHostNames(hosts);
// when ipaddress is normalized, same address is expected in return // when ipaddress is normalized, same address is expected in return
assertEquals(normalizedHosts.get(0), hosts.get(0)); assertEquals(normalizedHosts.get(0), hosts.get(0));