From 3d732616366b93a75351f4f43ecaa80d2d544abe Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Fri, 9 Nov 2012 03:13:43 +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/branches/branch-2@1407346 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 51a581573a3..b977d2b0b05 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -111,6 +111,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 be1c154cd70..dacaae9b2b5 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 @@ -431,7 +431,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 ..."); @@ -440,15 +440,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); }