Repository: hadoop Updated Branches: refs/heads/branch-2.7 d76273036 -> 95edf265b
HDFS-8307. Spurious DNS Queries from hdfs shell. Contributed by Andres Perez Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/95edf265 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/95edf265 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/95edf265 Branch: refs/heads/branch-2.7 Commit: 95edf265b3878784a6f239a5d46403a425b534a4 Parents: d762730 Author: Anu Engineer <[email protected]> Authored: Thu Nov 10 14:38:53 2016 -0800 Committer: Anu Engineer <[email protected]> Committed: Thu Nov 10 14:38:53 2016 -0800 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../java/org/apache/hadoop/hdfs/NameNodeProxies.java | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/95edf265/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index f33e27d..5363aa8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -67,6 +67,8 @@ Release 2.7.4 - UNRELEASED (Erik Krogen via Zhe Zhang) BUG FIXES + + HDFS-8307. Spurious DNS Queries from hdfs shell. (Andres Perez via aengineer) HDFS-9696. Garbage snapshot records linger forever. (kihwal) http://git-wip-us.apache.org/repos/asf/hadoop/blob/95edf265/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/NameNodeProxies.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/NameNodeProxies.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/NameNodeProxies.java index c7e2cf2..18ec688 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/NameNodeProxies.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/NameNodeProxies.java @@ -192,8 +192,18 @@ public class NameNodeProxies { dtService = SecurityUtil.buildTokenService( NameNode.getAddress(nameNodeUri)); } - return new ProxyAndInfo<T>(proxy, dtService, - NameNode.getAddress(nameNodeUri)); + + InetSocketAddress nnAddress; + + //We dont need to resolve the address if is it a Nameservice ID + if(HAUtil.isLogicalUri(conf, nameNodeUri)) { + nnAddress = InetSocketAddress.createUnresolved( + nameNodeUri.getHost(), NameNode.DEFAULT_PORT); + } else { + nnAddress = NameNode.getAddress(nameNodeUri); + } + + return new ProxyAndInfo<T>(proxy, dtService, nnAddress); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
