From 0565cb3c033264b697260c83d723f36f20c289b6 Mon Sep 17 00:00:00 2001 From: Harsh J Date: Fri, 13 Jul 2012 07:21:18 +0000 Subject: [PATCH] HDFS-3612. Single namenode image directory config warning can be improved. Contributed by Andy Isaacson. (harsh) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1361060 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hadoop/hdfs/server/namenode/FSNamesystem.java | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index c89cb456c5e..654cbebade8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -137,6 +137,9 @@ Release 2.0.1-alpha - UNRELEASED HDFS-3306. fuse_dfs: don't lock release operations. (Colin Patrick McCabe via eli) + HDFS-3612. Single namenode image directory config warning can + be improved. (Andy Isaacson via harsh) + OPTIMIZATIONS HDFS-2982. Startup performance suffers when there are many edit log diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java index b80e7a8496f..f3579f0d822 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java @@ -378,12 +378,14 @@ public class FSNamesystem implements Namesystem, FSClusterStats, throws IOException { if (namespaceDirs.size() == 1) { - LOG.warn("Only one " + DFS_NAMENODE_NAME_DIR_KEY - + " directory configured , beware data loss!"); + LOG.warn("Only one image storage directory (" + + DFS_NAMENODE_NAME_DIR_KEY + ") configured. Beware of dataloss" + + " due to lack of redundant storage directories!"); } if (namespaceEditsDirs.size() == 1) { - LOG.warn("Only one " + DFS_NAMENODE_EDITS_DIR_KEY - + " directory configured , beware data loss!"); + LOG.warn("Only one namespace edits storage directory (" + + DFS_NAMENODE_EDITS_DIR_KEY + ") configured. Beware of dataloss" + + " due to lack of redundant storage directories!"); } FSImage fsImage = new FSImage(conf, namespaceDirs, namespaceEditsDirs);