hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [1/2] hbase git commit: HBASE-16816 HMaster.move() should throw exception if region to move is not online (Allan Yang)
Date Sat, 12 Nov 2016 06:42:29 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 cf2cb620e -> dba43b628


HBASE-16816 HMaster.move() should throw exception if region to move is not online (Allan Yang)


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

Branch: refs/heads/0.98
Commit: 500e0b7a6794ae32a858a1ef1cd4e79fdcbb55b9
Parents: cf2cb62
Author: tedyu <yuzhihong@gmail.com>
Authored: Thu Oct 13 11:11:11 2016 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Fri Nov 11 18:15:01 2016 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/master/HMaster.java   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/500e0b7a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index 93f4e8b..4584a64 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -1805,6 +1805,11 @@ MasterServices, Server {
       getRegionState(Bytes.toString(encodedRegionName));
     if (regionState == null) {
       throw new UnknownRegionException(Bytes.toStringBinary(encodedRegionName));
+    } else if (!assignmentManager.getRegionStates()
+        .isRegionOnline(regionState.getRegion())) {
+      throw new HBaseIOException(
+          "moving region not onlined: " + regionState.getRegion() + ", "
+              + regionState);
     }
 
     HRegionInfo hri = regionState.getRegion();


Mime
View raw message