Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D6ECE200D23 for ; Thu, 19 Oct 2017 15:25:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D55421609ED; Thu, 19 Oct 2017 13:25:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2782D1609E2 for ; Thu, 19 Oct 2017 15:25:17 +0200 (CEST) Received: (qmail 53950 invoked by uid 500); 19 Oct 2017 13:25:16 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 53940 invoked by uid 99); 19 Oct 2017 13:25:16 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Oct 2017 13:25:16 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0FAE0DFB77; Thu, 19 Oct 2017 13:25:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: weichiu@apache.org To: common-commits@hadoop.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) archived-at: Thu, 19 Oct 2017 13:25:18 -0000 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 Authored: Thu Oct 19 06:17:59 2017 -0700 Committer: Wei-Chiu Chuang 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