From 6090f51725e2b44d794433ed72a1901fae2ba7e3 Mon Sep 17 00:00:00 2001 From: Jing Zhao Date: Mon, 2 Mar 2015 20:22:04 -0800 Subject: [PATCH] HDFS-7871. NameNodeEditLogRoller can keep printing 'Swallowing exception' message. Contributed by Jing Zhao. (cherry picked from commit b442aeec95abfa1c6f835a116dfe6e186b0d841d) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../apache/hadoop/hdfs/server/namenode/FSNamesystem.java | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index c945e1633b6..354b99b121d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -765,6 +765,9 @@ Release 2.7.0 - UNRELEASED HDFS-7785. Improve diagnostics information for HttpPutFailedException. (Chengbing Liu via wheat9) + HDFS-7871. NameNodeEditLogRoller can keep printing "Swallowing exception" + message. (jing9) + BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS HDFS-7720. Quota by Storage Type API, tools and ClientNameNode 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 c7d9350167e..17f313d23fd 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 @@ -4558,14 +4558,16 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean, + rollThreshold); rollEditLog(); } + } catch (Exception e) { + FSNamesystem.LOG.error("Swallowing exception in " + + NameNodeEditLogRoller.class.getSimpleName() + ":", e); + } + try { Thread.sleep(sleepIntervalMs); } catch (InterruptedException e) { FSNamesystem.LOG.info(NameNodeEditLogRoller.class.getSimpleName() + " was interrupted, exiting"); break; - } catch (Exception e) { - FSNamesystem.LOG.error("Swallowing exception in " - + NameNodeEditLogRoller.class.getSimpleName() + ":", e); } } }