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-17264 Processing RIT with offline state will always fail to open the first time (Allan Yang)
Date Tue, 07 Feb 2017 03:48:25 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 f708d986a -> 0a0aef345


HBASE-17264 Processing RIT with offline state will always fail to open the first time (Allan
Yang)


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

Branch: refs/heads/branch-1
Commit: 0a0aef345a4b4f4deaa66434f749a3abb248846b
Parents: f708d98
Author: tedyu <yuzhihong@gmail.com>
Authored: Mon Feb 6 19:48:14 2017 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Mon Feb 6 19:48:14 2017 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/master/AssignmentManager.java     | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/0a0aef34/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 2035f6a..f3c0787 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
@@ -874,7 +874,7 @@ public class AssignmentManager extends ZooKeeperListener {
 
       case M_ZK_REGION_OFFLINE:
         // Insert in RIT and resend to the regionserver
-        regionStates.updateRegionState(rt, State.PENDING_OPEN);
+        regionStates.updateRegionState(rt, State.OFFLINE);
         final RegionState rsOffline = regionStates.getRegionState(regionInfo);
         this.executorService.submit(
           new EventHandler(server, EventType.M_MASTER_RECOVERY) {
@@ -884,7 +884,7 @@ public class AssignmentManager extends ZooKeeperListener {
               try {
                 RegionPlan plan = new RegionPlan(regionInfo, null, sn);
                 addPlan(encodedName, plan);
-                assign(rsOffline, false, false);
+                assign(rsOffline, true, false);
               } finally {
                 lock.unlock();
               }
@@ -1608,6 +1608,7 @@ public class AssignmentManager extends ZooKeeperListener {
   /**
    * Use care with forceNewPlan. It could cause double assignment.
    */
+  @VisibleForTesting
   public void assign(HRegionInfo region,
       boolean setOfflineInZK, boolean forceNewPlan) {
     if (isDisabledorDisablingRegionInRIT(region)) {
@@ -2085,7 +2086,7 @@ public class AssignmentManager extends ZooKeeperListener {
    * @param setOfflineInZK
    * @param forceNewPlan
    */
-  private void assign(RegionState state,
+  public void assign(RegionState state,
       boolean setOfflineInZK, final boolean forceNewPlan) {
     long startTime = EnvironmentEdgeManager.currentTime();
     try {


Mime
View raw message