hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1171198 - 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 17:56:49 GMT
Author: tedyu
Date: Thu Sep 15 17:56:48 2011
New Revision: 1171198

URL: http://svn.apache.org/viewvc?rev=1171198&view=rev
Log:
HBASE-2196 Addendum 2 from Lars which uses an anonymous Stoppable

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=1171198&r1=1171197&r2=1171198&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 17:56:48 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 == null || stopper.isStopped()) {
+      if (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=1171198&r1=1171197&r2=1171198&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 17:56:48 2011
@@ -9,6 +9,7 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.Stoppable;
 import org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceManager;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -48,8 +49,15 @@ public class TestReplicationAdmin {
         HConstants.HREGION_OLDLOGDIR_NAME);
     Path logDir = new Path(TEST_UTIL.getTestDir(),
         HConstants.HREGION_LOGDIR_NAME);
-    manager = new ReplicationSourceManager(admin.getReplicationZk(),
-        conf, null, FileSystem.get(conf), replicating, logDir, oldLogDir);
+    manager = new ReplicationSourceManager(admin.getReplicationZk(), conf,
+        // The following stopper never stops so that we can respond
+        // to zk notification
+        new Stoppable() {
+          @Override
+          public void stop(String why) {}
+          @Override
+          public boolean isStopped() {return false;}
+        }, FileSystem.get(conf), replicating, logDir, oldLogDir);
   }
 
   /**



Mime
View raw message