瀏覽代碼

HDFS-7452. skip StandbyException log for getCorruptFiles() (Contributed by Bramha Reddy Battula)

(cherry picked from commit f313516731d787f6be64c9406ca83d941d47ee99)
Vinayakumar B 9 年之前
父節點
當前提交
3e76768f21

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -1874,6 +1874,9 @@ Release 2.8.0 - UNRELEASED
 
     HDFS-9839. Reduce verbosity of processReport logging. (Arpit Agarwal)
 
+    HDFS-7452. skip StandbyException log for getCorruptFiles()
+    (Bramha Reddy Battula via vinayakumarb)
+
 Release 2.7.3 - UNRELEASED
 
   INCOMPATIBLE CHANGES

+ 4 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

@@ -5554,6 +5554,10 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
           list.add(c.toString());
         }
       }
+    } catch (StandbyException e) {
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Get corrupt file blocks returned error: " + e.getMessage());
+      }
     } catch (IOException e) {
       LOG.warn("Get corrupt file blocks returned error: " + e.getMessage());
     }