Index: src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java (revision 1048931) +++ src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java (working copy) @@ -150,7 +150,7 @@ for (String id : this.zkHelper.getPeerClusters().keySet()) { addSource(id); } - List currentReplicators = this.zkHelper.getRegisteredRegionServers(); + List currentReplicators = this.zkHelper.getListOfReplicators(); if (currentReplicators == null || currentReplicators.size() == 0) { return; } @@ -406,6 +406,9 @@ * @param path full path of the deleted node */ public void nodeDeleted(String path) { + if (stopper.isStopped()) { + return; + } boolean cont = refreshRegionServersList(path); if (!cont) { return; @@ -419,6 +422,9 @@ * @param path full path of the node whose children have changed */ public void nodeChildrenChanged(String path) { + if (stopper.isStopped()) { + return; + } refreshRegionServersList(path); } Index: src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java (revision 1048933) +++ src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java (working copy) @@ -612,6 +612,10 @@ ZKUtil.deleteNodeRecursively(this.zookeeper, this.rsServerNameZnode); } catch (KeeperException e) { + // if the znode is already expired, don't bother going further + if (e instanceof KeeperException.SessionExpiredException) { + return; + } this.abortable.abort("Failed delete of " + this.rsServerNameZnode, e); } }