From f313516731d787f6be64c9406ca83d941d47ee99 Mon Sep 17 00:00:00 2001 From: Vinayakumar B Date: Mon, 22 Feb 2016 09:21:46 +0530 Subject: [PATCH] HDFS-7452. skip StandbyException log for getCorruptFiles() (Contributed by Bramha Reddy Battula) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 92154883f9..9a156a5a70 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -2804,6 +2804,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 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 4722ac1a35..64f23dd318 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 @@ -5596,6 +5596,10 @@ public String getCorruptFiles() { 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()); }