hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r774559 - in /hadoop/hbase/branches/0.19: CHANGES.txt src/java/org/apache/hadoop/hbase/master/RegionManager.java src/java/org/apache/hadoop/hbase/master/RegionServerOperation.java
Date Wed, 13 May 2009 22:12:46 GMT
Author: stack
Date: Wed May 13 22:12:46 2009
New Revision: 774559

URL: http://svn.apache.org/viewvc?rev=774559&view=rev
Log:
HBASE-1362 .META. may not come back if regionserver crashes

Modified:
    hadoop/hbase/branches/0.19/CHANGES.txt
    hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/master/RegionManager.java
    hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/master/RegionServerOperation.java

Modified: hadoop/hbase/branches/0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19/CHANGES.txt?rev=774559&r1=774558&r2=774559&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.19/CHANGES.txt Wed May 13 22:12:46 2009
@@ -5,6 +5,11 @@
                hbase.regionserver.hlog.blocksize is not specified
    HBASE-1344  WARN IllegalStateException: Cannot set a region as open if
                it has not been pending
+   HBASE-1362  .META. may not come back if regionserver crashes
+               (Nitay Joffe via Stack)
+
+  IMPROVEMENTS
+   HBASE-1418  Transacitonal improvments and fixes (Clint Morgan via Stack)
 
 Release 0.19.2 - May 9th, 2009 
   BUG FIXES

Modified: hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/master/RegionManager.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/master/RegionManager.java?rev=774559&r1=774558&r2=774559&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/master/RegionManager.java
(original)
+++ hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/master/RegionManager.java
Wed May 13 22:12:46 2009
@@ -509,7 +509,19 @@
       return Collections.unmodifiableMap(onlineMetaRegions);
     }
   }
-  
+
+  public boolean metaRegionsInTransition() {
+    synchronized (onlineMetaRegions) {
+      for (MetaRegion metaRegion : onlineMetaRegions.values()) {
+        byte [] regionName = metaRegion.getRegionName();
+        if (regionIsInTransition(regionName)) {
+          return true;
+        }
+      }
+    }
+    return false;
+  }
+
   /**
    * Stop the root and meta scanners so that the region servers serving meta
    * regions can shut down.

Modified: hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/master/RegionServerOperation.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/master/RegionServerOperation.java?rev=774559&r1=774558&r2=774559&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/master/RegionServerOperation.java
(original)
+++ hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/master/RegionServerOperation.java
Wed May 13 22:12:46 2009
@@ -69,8 +69,9 @@
 
   protected boolean metaTableAvailable() {
     boolean available = true;
-    if (master.regionManager.numMetaRegions() != 
-      master.regionManager.numOnlineMetaRegions()) {
+    if ((master.regionManager.numMetaRegions() !=
+      master.regionManager.numOnlineMetaRegions()) ||
+      master.regionManager.metaRegionsInTransition()) {
       // We can't proceed because not all of the meta regions are online.
       // We can't block either because that would prevent the meta region
       // online message from being processed. In order to prevent spinning



Mime
View raw message