hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject hadoop git commit: HDFS-3918. EditLogTailer shouldn't log WARN when other node is in standby mode. Contributed by Todd Lipcon.
Date Tue, 31 Mar 2015 02:47:44 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 abf3ad988 -> 32766b656


HDFS-3918. EditLogTailer shouldn't log WARN when other node is in standby mode. Contributed
by Todd Lipcon.

(cherry picked from commit cce66ba3c9ec293e8ba1afd0eb518c7ca0bbc7c9)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/32766b65
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/32766b65
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/32766b65

Branch: refs/heads/branch-2
Commit: 32766b6563e258e252a3652d4919dabb84f20391
Parents: abf3ad9
Author: Harsh J <harsh@cloudera.com>
Authored: Tue Mar 31 08:04:18 2015 +0530
Committer: Harsh J <harsh@cloudera.com>
Committed: Tue Mar 31 08:17:22 2015 +0530

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt              |  3 +++
 .../hadoop/hdfs/server/namenode/ha/EditLogTailer.java    | 11 +++++++++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/32766b65/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index cb4ac29..636f62d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -8,6 +8,9 @@ Release 2.8.0 - UNRELEASED
 
   IMPROVEMENTS
 
+    HDFS-3918. EditLogTailer shouldn't log WARN when other node
+    is in standby mode (todd via harsh)
+
     HDFS-4396. Add START_MSG/SHUTDOWN_MSG for ZKFC
     (Liang Xie via harsh)
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/32766b65/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java
index 6b6c8d4..1897d8d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/EditLogTailer.java
@@ -42,6 +42,8 @@ import org.apache.hadoop.hdfs.server.namenode.FSNamesystem;
 import org.apache.hadoop.hdfs.server.namenode.NameNode;
 import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol;
 import org.apache.hadoop.ipc.RPC;
+import org.apache.hadoop.ipc.RemoteException;
+import org.apache.hadoop.ipc.StandbyException;
 import org.apache.hadoop.security.SecurityUtil;
 
 import static org.apache.hadoop.util.Time.monotonicNow;
@@ -273,6 +275,15 @@ public class EditLogTailer {
       getActiveNodeProxy().rollEditLog();
       lastRollTriggerTxId = lastLoadedTxnId;
     } catch (IOException ioe) {
+      if (ioe instanceof RemoteException) {
+        ioe = ((RemoteException)ioe).unwrapRemoteException();
+        if (ioe instanceof StandbyException) {
+          LOG.info("Skipping log roll. Remote node is not in Active state: " +
+              ioe.getMessage().split("\n")[0]);
+          return;
+        }
+      }
+
       LOG.warn("Unable to trigger a roll of the active NN", ioe);
     }
   }


Mime
View raw message