From b442aeec95abfa1c6f835a116dfe6e186b0d841d 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. --- 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 52e5d3c42f..fe78097abc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1071,6 +1071,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 7cd194e188..d2b48f3745 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 void run() { + 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); } } }