HBASE-2196 Addendum 2 from Lars which uses an anonymous Stoppable
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1171198 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f23110b987
commit
067b987b3c
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue