hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramkris...@apache.org
Subject svn commit: r1177293 - in /hbase/branches/0.92: CHANGES.txt src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java src/test/java/org/apache/hadoop/hbase/master/TestRollingRestart.java
Date Thu, 29 Sep 2011 12:55:12 GMT
Author: ramkrishna
Date: Thu Sep 29 12:55:12 2011
New Revision: 1177293

URL: http://svn.apache.org/viewvc?rev=1177293&view=rev
Log:
HBASE-4492 TestMasterFailover fails intermittently(Ted yu and Ram)

Modified:
    hbase/branches/0.92/CHANGES.txt
    hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
    hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/master/TestRollingRestart.java

Modified: hbase/branches/0.92/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1177293&r1=1177292&r2=1177293&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Thu Sep 29 12:55:12 2011
@@ -306,6 +306,8 @@ Release 0.92.0 - Unreleased
                AssignmentManager (Ming Ma)
    HBASE-4488  Store could miss rows during flush (Lars H via jgray)
 
+  TESTS
+   HBASE-4492  TestRollingRestart fails intermittently
 
   IMPROVEMENTS
    HBASE-3290  Max Compaction Size (Nicolas Spiegelberg via Stack)  
@@ -534,8 +536,6 @@ Release 0.92.0 - Unreleased
    HBASE-4280  [replication] ReplicationSink can deadlock itself via handlers
    HBASE-4014  Coprocessors: Flag the presence of coprocessors in logged exceptions
                (Eugene Koontz)
-   HBASE-4454  Add failsafe plugin to build and rename integration tests
-               (Jesse Yates)
 
   TASKS
    HBASE-3559  Move report of split to master OFF the heartbeat channel

Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java?rev=1177293&r1=1177292&r2=1177293&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
(original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
Thu Sep 29 12:55:12 2011
@@ -1461,6 +1461,7 @@ public class AssignmentManager extends Z
             LOG.error(errorMsg, t);
             return;
           }
+        }
         LOG.warn("Failed assignment of " +
           state.getRegion().getRegionNameAsString() + " to " +
           plan.getDestination() + ", trying to assign elsewhere instead; " +
@@ -1477,7 +1478,6 @@ public class AssignmentManager extends Z
         }
       }
     }
-   }
   }
 
   private void debugLog(HRegionInfo region, String string) {

Modified: hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/master/TestRollingRestart.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/master/TestRollingRestart.java?rev=1177293&r1=1177292&r2=1177293&view=diff
==============================================================================
--- hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/master/TestRollingRestart.java
(original)
+++ hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/master/TestRollingRestart.java
Thu Sep 29 12:55:12 2011
@@ -210,7 +210,11 @@ public class TestRollingRestart {
     waitForRSShutdownToStartAndFinish(activeMaster,
         metaServer.getRegionServer().getServerName());
     log("Waiting for no more RIT");
-    blockUntilNoRIT(zkw, master);
+    long start = System.currentTimeMillis();
+    do {
+      blockUntilNoRIT(zkw, master);
+    } while (getNumberOfOnlineRegions(cluster) < numRegions 
+        && System.currentTimeMillis()-start < 60000);
     log("Verifying there are " + numRegions + " assigned on cluster");
     assertRegionsAssigned(cluster, regions);
     assertEquals(expectedNumRS, cluster.getRegionServerThreads().size());
@@ -345,12 +349,17 @@ public class TestRollingRestart {
     return null;
   }
 
-  private void assertRegionsAssigned(MiniHBaseCluster cluster,
-      Set<String> expectedRegions) throws IOException {
+  private int getNumberOfOnlineRegions(MiniHBaseCluster cluster) {
     int numFound = 0;
     for (RegionServerThread rst : cluster.getLiveRegionServerThreads()) {
       numFound += rst.getRegionServer().getNumberOfOnlineRegions();
     }
+    return numFound;
+  }
+  
+  private void assertRegionsAssigned(MiniHBaseCluster cluster,
+      Set<String> expectedRegions) throws IOException {
+    int numFound = getNumberOfOnlineRegions(cluster);
     if (expectedRegions.size() > numFound) {
       log("Expected to find " + expectedRegions.size() + " but only found"
           + " " + numFound);



Mime
View raw message