You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2017/05/23 07:36:42 UTC

[30/50] [abbrv] hbase git commit: Check SPLIT state

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 <st...@apache.org>
Authored: Fri May 19 14:00:24 2017 -0700
Committer: Michael Stack <st...@apache.org>
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
+}