From ed18527e38438113fdf2f48b08be5ec283a5f481 Mon Sep 17 00:00:00 2001 From: rohithsharmaks Date: Fri, 8 Jan 2016 14:30:28 +0530 Subject: [PATCH] Revert "HADOOP-12687. SecureUtil#QualifiedHostResolver#getByName should also try to resolve direct hostname (Sunil G via rohithsharmaks)" This reverts commit 2b252844e04eebd4f32815d4bd6f914c02994709. Conflicts: hadoop-common-project/hadoop-common/CHANGES.txt --- hadoop-common-project/hadoop-common/CHANGES.txt | 4 ---- .../main/java/org/apache/hadoop/security/SecurityUtil.java | 6 ------ 2 files changed, 10 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 84cd025be4..78cd2ddf6b 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -661,10 +661,6 @@ Release 2.9.0 - UNRELEASED BUG FIXES - HADOOP-12687. SecureUtil#QualifiedHostResolver#getByName should also try to - resolve direct hostname, incase multiple loopback addresses are present in - /etc/hosts (Sunil G via rohithsharmaks) - HADOOP-12655. TestHttpServer.testBindAddress bind port range is wider than expected. (Wei-Chiu Chuang via stevel) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java index 714c923a62..38096ab471 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java @@ -580,13 +580,7 @@ public InetAddress getByName(String host) throws UnknownHostException { addr = getByNameWithSearch(host); if (addr == null) { addr = getByExactName(host); - // If multiple loopback addresses are present, a direct lookup - // will be helpful - if (addr == null) { - addr = InetAddress.getByName(host); - } } - } } // unresolvable!