From 312eb235981166b905a668c82c146ce373ecaffa Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Fri, 9 Nov 2012 02:57:05 +0000 Subject: [PATCH] HDFS-4048. Use ERROR instead of INFO for volume failure logs. Contributed by Stephen Chu git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1407345 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../org/apache/hadoop/hdfs/server/common/Storage.java | 8 ++++---- .../hdfs/server/datanode/fsdataset/impl/FsVolumeList.java | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index cec087011da..0898deeeb34 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -461,6 +461,9 @@ Release 2.0.3-alpha - Unreleased HDFS-4046. Rename ChecksumTypeProto enum NULL since it is illegal in C/C++. (Binglin Chang via suresh) + HDFS-4048. Use ERROR instead of INFO for volume failure logs. + (Stephen Chu via eli) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java index 4a019b73fbe..cef7d237c24 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java @@ -433,7 +433,7 @@ public abstract class Storage extends StorageInfo { if (!root.exists()) { // storage directory does not exist if (startOpt != StartupOption.FORMAT) { - LOG.info("Storage directory " + rootPath + " does not exist"); + LOG.warn("Storage directory " + rootPath + " does not exist"); return StorageState.NON_EXISTENT; } LOG.info(rootPath + " does not exist. Creating ..."); @@ -442,15 +442,15 @@ public abstract class Storage extends StorageInfo { } // or is inaccessible if (!root.isDirectory()) { - LOG.info(rootPath + "is not a directory"); + LOG.warn(rootPath + "is not a directory"); return StorageState.NON_EXISTENT; } if (!root.canWrite()) { - LOG.info("Cannot access storage directory " + rootPath); + LOG.warn("Cannot access storage directory " + rootPath); return StorageState.NON_EXISTENT; } } catch(SecurityException ex) { - LOG.info("Cannot access storage directory " + rootPath, ex); + LOG.warn("Cannot access storage directory " + rootPath, ex); return StorageState.NON_EXISTENT; } diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsVolumeList.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsVolumeList.java index 107ce5d2f8c..66ecdbc8c1d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsVolumeList.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsVolumeList.java @@ -137,7 +137,7 @@ class FsVolumeList { if (removedVols != null && removedVols.size() > 0) { // Replace volume list volumes = Collections.unmodifiableList(volumeList); - FsDatasetImpl.LOG.info("Completed checkDirs. Removed " + removedVols.size() + FsDatasetImpl.LOG.warn("Completed checkDirs. Removed " + removedVols.size() + " volumes. Current volumes: " + this); }