hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r787444 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/master/BaseScanner.java
Date Mon, 22 Jun 2009 23:39:03 GMT
Author: stack
Date: Mon Jun 22 23:39:03 2009
New Revision: 787444

URL: http://svn.apache.org/viewvc?rev=787444&view=rev
Log:
HBASE-1508 Shell 'close_region' reveals a Master<>HRS problem, regions are not reassigned

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/BaseScanner.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=787444&r1=787443&r2=787444&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Mon Jun 22 23:39:03 2009
@@ -214,6 +214,8 @@
    HBASE-1561  HTable Mismatch between javadoc and what it actually does
    HBASE-1558  deletes use 'HConstants.LATEST_TIMESTAMP' but no one translates
                that into 'now'
+   HBASE-1508  Shell "close_region" reveals a Master<>HRS problem, regions are
+               not reassigned
 
   IMPROVEMENTS
    HBASE-1089  Add count of regions on filesystem to master UI; add percentage

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/BaseScanner.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/BaseScanner.java?rev=787444&r1=787443&r2=787444&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/BaseScanner.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/BaseScanner.java Mon Jun 22
23:39:03 2009
@@ -349,14 +349,15 @@
     }
     HServerInfo storedInfo = null;
     synchronized (this.master.regionManager) {
-      /*
-       * We don't assign regions that are offline, in transition or were on
-       * a dead server. Regions that were on a dead server will get reassigned
-       * by ProcessServerShutdown
+      /* We don't assign regions that are offline, in transition or were on
+       * a dead server (unless they have an empty serverName which would imply
+       * they haven't been assigned in the first place OR it was closed from
+       * the shell with 'close_region' which deletes server and startcode
+       * from .META. so region gets reassigned). Regions that were on a dead
+       * server will get reassigned by ProcessServerShutdown
        */
       if (info.isOffline() ||
-        this.master.regionManager.
-            regionIsInTransition(info.getRegionNameAsString()) ||
+        (serverName != null && this.master.regionManager.regionIsInTransition(info.getRegionNameAsString()))
||
           (serverName != null && this.master.serverManager.isDead(serverName))) {
         return;
       }



Mime
View raw message