Index: src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java (revision 1202533) +++ src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java (working copy) @@ -251,6 +251,10 @@ } catch (KeeperException ke) { this.terminate("Could not read peer's cluster id", ke); } + if (clusterId.equals(peerClusterId)) { + this.terminate("Replication requested to same cluster, " + + "terminating replication to " + clusterId); + } LOG.info("Replicating "+clusterId + " -> " + peerClusterId); // If this is recovered, the queue is already full and the first log