HBASE-20651 Master, prevents hbck or shell command to reassign the split parent region
Signed-off-by: Esteban Gutierrez <este...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2568abe3 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2568abe3 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2568abe3 Branch: refs/heads/branch-1.3 Commit: 2568abe310ae49c5443c77c66b344420825c7e4f Parents: 3fb6125 Author: Huaxiang Sun <h...@cloudera.com> Authored: Tue Jul 10 16:05:57 2018 -0700 Committer: Andrew Purtell <apurt...@apache.org> Committed: Wed Jul 11 11:44:00 2018 -0700 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hbase/master/AssignmentManager.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/2568abe3/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java index bf77dbf..63ef5ff 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java @@ -1595,6 +1595,11 @@ public class AssignmentManager extends ZooKeeperListener { * @param regionInfo */ public void regionOffline(final HRegionInfo regionInfo) { + if (regionStates.isRegionInState(regionInfo, State.MERGED, State.SPLIT)) { + LOG.info("Try to offline region " + regionInfo.getEncodedName() + + ", which is at state " + regionStates.getRegionState(regionInfo).getState() + ", skip"); + return; + } regionOffline(regionInfo, null); }