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 650DE200CA4 for ; Tue, 23 May 2017 09:36:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 63BB5160BB6; Tue, 23 May 2017 07:36:22 +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 9A9A8160BDF for ; Tue, 23 May 2017 09:36:21 +0200 (CEST) Received: (qmail 84951 invoked by uid 500); 23 May 2017 07:36:18 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 81348 invoked by uid 99); 23 May 2017 07:36:14 -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; Tue, 23 May 2017 07:36:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5E0FFF4A47; Tue, 23 May 2017 07:36:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: stack@apache.org To: commits@hbase.apache.org Date: Tue, 23 May 2017 07:36:42 -0000 Message-Id: In-Reply-To: <8d7438330077469cb61a79358dad91c6@git.apache.org> References: <8d7438330077469cb61a79358dad91c6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [30/50] [abbrv] hbase git commit: Check SPLIT state archived-at: Tue, 23 May 2017 07:36:22 -0000 Check SPLIT state Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/fa6934a9 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fa6934a9 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fa6934a9 Branch: refs/heads/HBASE-14614 Commit: fa6934a90fea1e63761c8c83f9c5f07d9f698f38 Parents: 0a216de Author: Michael Stack Authored: Fri May 19 14:00:24 2017 -0700 Committer: Michael Stack Committed: Tue May 23 00:33:03 2017 -0700 ---------------------------------------------------------------------- .../master/assignment/SplitTableRegionProcedure.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/fa6934a9/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java index 2b5f46b..a893783 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/SplitTableRegionProcedure.java @@ -342,11 +342,14 @@ public class SplitTableRegionProcedure parentHRI = node.getRegionInfo(); // Lookup the parent HRI state from the AM, which has the latest updated info. - // Protect against the case where concurrent SPLIT requests came in. Check a SPLIT - // did not just run. + // Protect against the case where concurrent SPLIT requests came in and succeeded + // just before us. + if (node.isInState(State.SPLIT)) { + LOG.info("Split of " + parentHRI + " skipped; state is already SPLIT"); + return false; + } if (parentHRI.isSplit() || parentHRI.isOffline()) { - LOG.info("Split of " + parentHRI.getShortNameToLog() + - " skipped because already offline/split."); + LOG.info("Split of " + parentHRI + " skipped because offline/split."); return false; } @@ -727,4 +730,4 @@ public class SplitTableRegionProcedure } return traceEnabled; } -} \ No newline at end of file +}