hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-17265 Region left unassigned in master failover when region failed to open (Allan Yang)
Date Thu, 09 Feb 2017 20:45:54 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 5a044ffc6 -> 695920846


HBASE-17265 Region left unassigned in master failover when region failed to open (Allan Yang)


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

Branch: refs/heads/branch-1.3
Commit: 6959208463930faaa9295c6fcbedfdaa3b6e10af
Parents: 5a044ff
Author: tedyu <yuzhihong@gmail.com>
Authored: Thu Feb 9 12:45:46 2017 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Thu Feb 9 12:45:46 2017 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/master/AssignmentManager.java |  2 +-
 .../java/org/apache/hadoop/hbase/master/RegionStates.java | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/69592084/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 59e938d..1e19397 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
@@ -1065,7 +1065,7 @@ public class AssignmentManager extends ZooKeeperListener {
             failedOpenTracker.remove(encodedName);
           } else {
             // Handle this the same as if it were opened and then closed.
-            regionState = regionStates.updateRegionState(rt, State.CLOSED);
+            regionState = regionStates.setRegionStateTOCLOSED(rt.getRegionName(), sn);
             if (regionState != null) {
               // When there are more than one region server a new RS is selected as the
               // destination and the same is updated in the regionplan. (HBASE-5546)

http://git-wip-us.apache.org/repos/asf/hbase/blob/69592084/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java
index 9d68a85..96125f0 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java
@@ -390,6 +390,16 @@ public class RegionStates {
    * Set the region state to CLOSED
    */
   public RegionState setRegionStateTOCLOSED(
+      final byte[] regionName,
+      final ServerName serverName) {
+    HRegionInfo regionInfo = getRegionInfo(regionName);
+    return setRegionStateTOCLOSED(regionInfo, serverName);
+  }
+
+  /**
+   * Set the region state to CLOSED
+   */
+  public RegionState setRegionStateTOCLOSED(
       final HRegionInfo regionInfo,
       final ServerName serverName) {
     ServerName sn = serverName;


Mime
View raw message