hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r941101 - in /hadoop/hbase/trunk: ./ core/src/main/java/org/apache/hadoop/hbase/master/ core/src/main/java/org/apache/hadoop/hbase/regionserver/
Date Tue, 04 May 2010 23:41:02 GMT
Author: stack
Date: Tue May  4 23:41:01 2010
New Revision: 941101

URL: http://svn.apache.org/viewvc?rev=941101&view=rev
Log:
HBASE-2513 hbase-2414 added bug where we'd tight-loop if no root available

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
    hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/master/RegionServerOperationQueue.java
    hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=941101&r1=941100&r2=941101&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Tue May  4 23:41:01 2010
@@ -302,6 +302,7 @@ Release 0.21.0 - Unreleased
                useful (Benoit Sigoure via Stack)
    HBASE-2482  regions in transition do not get reassigned by master when RS
                crashes (Todd Lipcon via Stack)
+   HBASE-2513  hbase-2414 added bug where we'd tight-loop if no root available
 
   IMPROVEMENTS
    HBASE-1760  Cleanup TODOs in HTable

Modified: hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=941101&r1=941100&r2=941101&view=diff
==============================================================================
--- hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Tue
May  4 23:41:01 2010
@@ -445,15 +445,15 @@ public class HMaster extends Thread impl
             break;
           }
         }
-        if (this.regionManager.getRootRegionLocation() != null) {
-          switch(this.regionServerOperationQueue.process()) {
-          case FAILED:
+        boolean doDelayQueue = this.regionManager.getRootRegionLocation() != null;
+        switch (this.regionServerOperationQueue.process(doDelayQueue)) {
+        case FAILED:
+          break FINISHED;
+        case REQUEUED_BUT_PROBLEM:
+          if (!checkFileSystem())
             break FINISHED;
-          case REQUEUED_BUT_PROBLEM:
-            if (!checkFileSystem()) break FINISHED;
-          default: // PROCESSED, NOOP, REQUEUED:
-            break;
-          }
+        default: // PROCESSED, NOOP, REQUEUED:
+          break;
         }
       }
     } catch (Throwable t) {

Modified: hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/master/RegionServerOperationQueue.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/master/RegionServerOperationQueue.java?rev=941101&r1=941100&r2=941101&view=diff
==============================================================================
--- hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/master/RegionServerOperationQueue.java
(original)
+++ hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/master/RegionServerOperationQueue.java
Tue May  4 23:41:01 2010
@@ -109,11 +109,16 @@ public class RegionServerOperationQueue 
 
   /**
    * Try to get an operation off of the queue and process it.
+   * @param skipDelayedToDos If true, do not do delayed todos first but instead
+   * move straight to the current todos list.  This is set when we want to be
+   * sure that recently queued events are processed first such as the onlining
+   * of root region (Root region needs to be online before we can do meta
+   * onlining; meta onlining needs to be done before we can do... and so on). 
    * @return {@link ProcessingResultCode#PROCESSED},
    * {@link ProcessingResultCode#REQUEUED},
    * {@link ProcessingResultCode#REQUEUED_BUT_PROBLEM}
    */ 
-  public synchronized ProcessingResultCode process() {
+  public synchronized ProcessingResultCode process(final boolean skipDelayedToDos) {
     RegionServerOperation op = delayedToDoQueue.poll();
     // if there aren't any todo items in the queue, sleep for a bit.
     if (op == null) {

Modified: hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=941101&r1=941100&r2=941101&view=diff
==============================================================================
--- hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Tue May  4 23:41:01 2010
@@ -2429,7 +2429,7 @@ public class HRegionServer implements HC
       final Configuration conf2)  {
     try {
       Constructor<? extends HRegionServer> c =
-        regionServerClass.getConstructor(HBaseConfiguration.class);
+        regionServerClass.getConstructor(Configuration.class);
       return c.newInstance(conf2);
     } catch (Exception e) {
       throw new RuntimeException("Failed construction of " +



Mime
View raw message