hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1464233 - /hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
Date Wed, 03 Apr 2013 23:17:16 GMT
Author: stack
Date: Wed Apr  3 23:17:16 2013
New Revision: 1464233

URL: http://svn.apache.org/r1464233
Log:
HBASE-7923 force unassign can confirm region online on any RS to get rid of double assignments

Modified:
    hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java

Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1464233&r1=1464232&r2=1464233&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
(original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
Wed Apr  3 23:17:16 2013
@@ -2267,11 +2267,14 @@ Server {
           return urr;
         }
       }
-      if (force) {
-        this.assignmentManager.regionOffline(hri);
+      LOG.debug("Close region " + hri.getRegionNameAsString()
+          + " on current location if it is online and reassign.force=" + force);
+      this.assignmentManager.unassign(hri, force);
+      if (!this.assignmentManager.getRegionStates().isRegionInTransition(hri)
+          && !this.assignmentManager.getRegionStates().isRegionAssigned(hri)) {
+        LOG.debug("Region " + hri.getRegionNameAsString()
+            + " is not online on any region server, reassigning it.");
         assignRegion(hri);
-      } else {
-        this.assignmentManager.unassign(hri, force);
       }
       if (cpHost != null) {
         cpHost.postUnassign(hri, force);



Mime
View raw message