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 04:25:12 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 b1690e176 -> 27303fdfb


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/27303fdf
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/27303fdf
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/27303fdf

Branch: refs/heads/branch-1.2
Commit: 27303fdfb7180d8ba8d8241dc7217a35cc310994
Parents: b1690e1
Author: tedyu <yuzhihong@gmail.com>
Authored: Mon Feb 6 20:25:05 2017 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Mon Feb 6 20:25:05 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/27303fdf/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 29eacf0..d1ac1bb 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
@@ -847,7 +847,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) {
@@ -857,7 +857,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();
               }
@@ -1581,6 +1581,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)) {
@@ -2058,7 +2059,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