hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1171036 - in /hbase/trunk/src: main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
Date Thu, 15 Sep 2011 10:34:36 GMT
Author: tedyu
Date: Thu Sep 15 10:34:36 2011
New Revision: 1171036

URL: http://svn.apache.org/viewvc?rev=1171036&view=rev
Log:
HBASE-2196 Addendum fix TestReplicationAdmin where multi-slave is supported

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java?rev=1171036&r1=1171035&r2=1171036&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
Thu Sep 15 10:34:36 2011
@@ -427,7 +427,7 @@ public class ReplicationSourceManager {
      * @param path full path of the node whose children have changed
      */
     public void nodeChildrenChanged(String path) {
-      if (stopper.isStopped()) {
+      if (stopper == null || stopper.isStopped()) {
         return;
       }
       refreshRegionServersList(path);

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java?rev=1171036&r1=1171035&r2=1171036&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
(original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
Thu Sep 15 10:34:36 2011
@@ -77,16 +77,16 @@ public class TestReplicationAdmin {
       // OK!
     }
     assertEquals(1, admin.getPeersCount());
-    // Add a second, returns illegal since multi-slave isn't supported
+    // Add a second since multi-slave is supported
     try {
       admin.addPeer(ID_SECOND, KEY_SECOND);
-      fail();
     } catch (IllegalStateException iae) {
+      fail();
       // OK!
     }
-    assertEquals(1, admin.getPeersCount());
+    assertEquals(2, admin.getPeersCount());
     // Remove the first peer we added
     admin.removePeer(ID_ONE);
-    assertEquals(0, admin.getPeersCount());
+    assertEquals(1, admin.getPeersCount());
   }
 }



Mime
View raw message