hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weic...@apache.org
Subject hadoop git commit: HDFS-12619. Do not catch and throw unchecked exceptions if IBRs fail to process. Contributed by Wei-Chiu Chuang.
Date Thu, 19 Oct 2017 13:25:16 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 9eb33d0e8 -> ce93a2b84


HDFS-12619. Do not catch and throw unchecked exceptions if IBRs fail to process. Contributed
by Wei-Chiu Chuang.

(cherry picked from commit 4ab0c8f96a41c573cc1f1e71c18871d243f952b9)


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

Branch: refs/heads/branch-2
Commit: ce93a2b84badacb6d0b19bbb149afbcf8f38c665
Parents: 9eb33d0
Author: Wei-Chiu Chuang <weichiu@apache.org>
Authored: Thu Oct 19 06:17:59 2017 -0700
Committer: Wei-Chiu Chuang <weichiu@apache.org>
Committed: Thu Oct 19 06:18:40 2017 -0700

----------------------------------------------------------------------
 .../hadoop/hdfs/server/blockmanagement/BlockManager.java  | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ce93a2b8/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
index 4f0ec43..a49cb24 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
@@ -3443,11 +3443,15 @@ public class BlockManager implements BlockStatsMXBean {
       throw new IOException(
           "Got incremental block report from unregistered or dead node");
     }
+
+    boolean successful = false;
     try {
       processIncrementalBlockReport(node, srdb);
-    } catch (Exception ex) {
-      node.setForceRegistration(true);
-      throw ex;
+      successful = true;
+    } finally {
+      if (!successful) {
+        node.setForceRegistration(true);
+      }
     }
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message