Index: hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueues.java =================================================================== --- hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueues.java (revision 1558961) +++ hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueues.java (working copy) @@ -106,4 +106,11 @@ * @return a list of server names */ List getListOfReplicators(); + + /** + * Checks if the provided znode is the same as this region server's + * @param znode to check + * @return if this is this rs's znode + */ + boolean isThisOurZnode(String znode); } Index: hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java =================================================================== --- hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java (revision 1558961) +++ hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationQueuesZKImpl.java (working copy) @@ -154,12 +154,13 @@ } @Override + public boolean isThisOurZnode(String znode) { + return ZKUtil.joinZNode(this.queuesZNode, znode).equals(this.myQueuesZnode); + } + + @Override public SortedMap> claimQueues(String regionserverZnode) { SortedMap> newQueues = new TreeMap>(); - if (ZKUtil.joinZNode(this.queuesZNode, regionserverZnode).equals(this.myQueuesZnode)) { - LOG.warn("An attempt was made to claim our own queues on region server " + regionserverZnode); - return newQueues; - } // check whether there is multi support. If yes, use it. if (conf.getBoolean(HConstants.ZOOKEEPER_USEMULTI, true)) { LOG.info("Atomically moving " + regionserverZnode + "'s hlogs to my queue"); Index: hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java (revision 1558961) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java (working copy) @@ -475,6 +475,9 @@ @Override public void run() { + if (this.rq.isThisOurZnode(rsZnode)) { + return; + } // Wait a bit before transferring the queues, we may be shutting down. // This sleep may not be enough in some cases. try {