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-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 Wed, 16 Sep 2015 00:42:56 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 334c716ae -> 13af5d2a2


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

Signed-off-by: Andrew Purtell <apurtell@apache.org>


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

Branch: refs/heads/0.98
Commit: 7344676074f3e9a57693d77558b432a188d76cee
Parents: 334c716
Author: Pankaj <pankaj.kr@huawei.com>
Authored: Tue Sep 15 17:10:18 2015 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Tue Sep 15 17:10:21 2015 -0700

----------------------------------------------------------------------
 .../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/73446760/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 6df721b..ff90f50 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
@@ -2034,7 +2034,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.currentTimeMillis();
     try {
       Configuration conf = server.getConfiguration();
@@ -2082,6 +2082,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());
@@ -2255,8 +2256,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