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-14875 Forward port HBASE-14207 'Region was hijacked and remained in transition when RS failed to open a region and later regionplan changed to new RS on retry'
Date Tue, 24 Nov 2015 22:32:08 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.1 7d3364b04 -> a75d2aac4


HBASE-14875 Forward port HBASE-14207 'Region was hijacked and remained in transition when
RS failed to open a region and later regionplan changed to new RS on retry'


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

Branch: refs/heads/branch-1.1
Commit: a75d2aac4f48b7c0b2d679416f081a05242d4378
Parents: 7d3364b
Author: tedyu <yuzhihong@gmail.com>
Authored: Tue Nov 24 14:32:13 2015 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Tue Nov 24 14:32:13 2015 -0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/a75d2aac/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 3782471..3f96ae1 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
@@ -2055,7 +2055,7 @@ public class AssignmentManager extends ZooKeeperListener {
    * @param forceNewPlan
    */
   private void assign(RegionState state,
-      final boolean setOfflineInZK, final boolean forceNewPlan) {
+      boolean setOfflineInZK, final boolean forceNewPlan) {
     long startTime = EnvironmentEdgeManager.currentTime();
     try {
       Configuration conf = server.getConfiguration();
@@ -2101,6 +2101,7 @@ public class AssignmentManager extends ZooKeeperListener {
           return;
         }
         if (setOfflineInZK && versionOfOfflineNode == -1) {
+          LOG.info("Setting node as OFFLINED in ZooKeeper for region " + region);
           // get the version of the znode after setting it to OFFLINE.
           // versionOfOfflineNode will be -1 if the znode was not set to OFFLINE
           versionOfOfflineNode = setOfflineInZooKeeper(currentState, plan.getDestination());
@@ -2270,8 +2271,13 @@ public class AssignmentManager extends ZooKeeperListener {
             // Clean out plan we failed execute and one that doesn't look like it'll
             // succeed anyways; we need a new plan!
             // Transition back to OFFLINE
+            LOG.info("Region assignment plan changed from " + plan.getDestination() + " to
"
+                + newPlan.getDestination() + " server.");
             currentState = regionStates.updateRegionState(region, State.OFFLINE);
             versionOfOfflineNode = -1;
+            if (useZKForAssignment) {
+              setOfflineInZK = true;
+            }
             plan = newPlan;
           } else if(plan.getDestination().equals(newPlan.getDestination()) &&
               previousException instanceof FailedServerException) {


Mime
View raw message