From d3473f1e20f2b8a1ba05737155eaf154148d2c1d Mon Sep 17 00:00:00 2001 From: Aaron Myers Date: Mon, 9 Jun 2014 18:59:53 +0000 Subject: [PATCH] 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/branches/branch-2@1601479 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../src/test/java/org/apache/hadoop/net/TestNetUtils.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index e7b14894709..d11065ad57a 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -183,6 +183,9 @@ Release 2.5.0 - UNRELEASED HADOOP-10647. String Format Exception in SwiftNativeFileSystemStore.java. (Gene Kim via stevel) + HADOOP-9099. NetUtils.normalizeHostName fails on domains where + UnknownHost resolves to an IP address. (Ivan Mitic via suresh) + Release 2.4.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java index e8455862d79..995392b50a7 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java @@ -605,7 +605,7 @@ public class TestNetUtils { @Test public void testNormalizeHostName() { List hosts = Arrays.asList(new String[] {"127.0.0.1", - "localhost", "3w.org", "UnknownHost"}); + "localhost", "3w.org", "UnknownHost123"}); List normalizedHosts = NetUtils.normalizeHostNames(hosts); // when ipaddress is normalized, same address is expected in return assertEquals(normalizedHosts.get(0), hosts.get(0));