hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1198008 - in /hbase/branches/0.92: CHANGES.txt src/main/java/org/apache/hadoop/hbase/master/HMaster.java src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
Date Sat, 05 Nov 2011 18:47:07 GMT
Author: stack
Date: Sat Nov  5 18:47:07 2011
New Revision: 1198008

URL: http://svn.apache.org/viewvc?rev=1198008&view=rev
Log:
HBASE-4749 TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS occasionally fails

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

Modified: hbase/branches/0.92/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1198008&r1=1198007&r2=1198008&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Sat Nov  5 18:47:07 2011
@@ -677,6 +677,10 @@ Release 0.92.0 - Unreleased
                HConnectionManager$HConnectionImplementation (Lucian George Iordache)
    HBASE-4719  HBase script assumes pre-Hadoop 0.21 layout of jar files
                (Roman Shposhnik)
+   HBASE-4553  The update of .tableinfo is not atomic; we remove then rename
+   HBASE-4725  NPE in AM#updateTimers
+   HBASE-4749  TestMasterFailover#testMasterFailoverWithMockedRITOnDeadRS
+               occasionally fails
 
   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/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1198008&r1=1198007&r2=1198008&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Sat Nov
 5 18:47:07 2011
@@ -1294,8 +1294,10 @@ implements HMasterInterface, HMasterRegi
     LOG.info(why);
     this.stopped = true;
     // If we are a backup master, we need to interrupt wait
-    synchronized (this.activeMasterManager.clusterHasActiveMaster) {
-      this.activeMasterManager.clusterHasActiveMaster.notifyAll();
+    if (this.activeMasterManager != null) {
+      synchronized (this.activeMasterManager.clusterHasActiveMaster) {
+        this.activeMasterManager.clusterHasActiveMaster.notifyAll();
+      }
     }
   }
 

Modified: hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java?rev=1198008&r1=1198007&r2=1198008&view=diff
==============================================================================
--- hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
(original)
+++ hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
Sat Nov  5 18:47:07 2011
@@ -50,6 +50,7 @@ import org.apache.hadoop.hbase.regionser
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.FSTableDescriptors;
 import org.apache.hadoop.hbase.util.JVMClusterUtil;
+import org.apache.hadoop.hbase.util.Threads;
 import org.apache.hadoop.hbase.util.JVMClusterUtil.MasterThread;
 import org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread;
 import org.apache.hadoop.hbase.zookeeper.ZKAssign;
@@ -706,10 +707,13 @@ public class TestMasterFailover {
     assertEquals(2, cluster.countServedRegions());
 
     // The first RS will stay online
-    HRegionServer hrs = cluster.getRegionServer(0);
+    List<RegionServerThread> regionservers =
+      cluster.getRegionServerThreads();
+    HRegionServer hrs = regionservers.get(0).getRegionServer();
 
     // The second RS is going to be hard-killed
-    HRegionServer hrsDead = cluster.getRegionServer(1);
+    RegionServerThread hrsDeadThread = regionservers.get(1);
+    HRegionServer hrsDead = hrsDeadThread.getRegionServer();
     ServerName deadServerName = hrsDead.getServerName();
 
     // we'll need some regions to already be assigned out properly on live RS
@@ -916,7 +920,11 @@ public class TestMasterFailover {
     hrsDead.abort("Killing for unit test");
     log("RS " + deadServerName + " killed");
 
-    // Start up a new master
+    // Start up a new master.  Wait until regionserver is completely down
+    // before starting new master because of hbase-4511.
+    while (hrsDeadThread.isAlive()) {
+      Threads.sleep(10);
+    }
     log("Starting up a new master");
     master = cluster.startMaster().getMaster();
     log("Waiting for master to be ready");



Mime
View raw message