From 4b16c2b65ea92bc7b3cfd32ea802f94e35cbb337 Mon Sep 17 00:00:00 2001 From: Konstantin Boudnik Date: Tue, 14 Jan 2014 21:59:51 +0000 Subject: [PATCH] HDFS-5677. Need error checking for HA cluster configuration. Contributed by Vincent Sheffer. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1558217 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/hdfs/DFSUtil.java | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 682f77a2d76..fcc5f067b26 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -924,6 +924,9 @@ Release 2.3.0 - UNRELEASED HDFS-5675. Add Mkdirs operation to NNThroughputBenchmark. (Plamen Jeliazkov via shv) + HDFS-5677. Need error checking for HA cluster configuration. + (Vincent Sheffer via cos) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java index 112fa063f16..1d0421e397b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java @@ -585,6 +585,12 @@ public class DFSUtil { String address = getConfValue(defaultValue, suffix, conf, keys); if (address != null) { InetSocketAddress isa = NetUtils.createSocketAddr(address); + if (isa.isUnresolved()) { + LOG.warn("Namenode for " + nsId + + " remains unresolved for ID " + nnId + + ". Check your hdfs-site.xml file to " + + "ensure namenodes are configured properly."); + } ret.put(nnId, isa); } }