Repository: hbase Updated Branches: refs/heads/master b0e998f2a -> 397d34736
HBASE-19905 ReplicationSyncUp tool will not exit if a peer replication is disabled Signed-off-by: Ashish Singhi <ashishsin...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/397d3473 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/397d3473 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/397d3473 Branch: refs/heads/master Commit: 397d34736e63d7661a2f01524f8b302e1309d40f Parents: b0e998f Author: Ashish Singhi <ashishsin...@apache.org> Authored: Sun Feb 4 17:52:38 2018 +0530 Committer: Ashish Singhi <ashishsin...@apache.org> Committed: Sun Feb 4 17:52:38 2018 +0530 ---------------------------------------------------------------------- .../replication/regionserver/ReplicationSourceManager.java | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/397d3473/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java index 2147214..6e87563 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java @@ -55,6 +55,7 @@ import org.apache.hadoop.hbase.client.ConnectionFactory; import org.apache.hadoop.hbase.replication.ReplicationException; import org.apache.hadoop.hbase.replication.ReplicationListener; import org.apache.hadoop.hbase.replication.ReplicationPeer; +import org.apache.hadoop.hbase.replication.ReplicationPeer.PeerState; import org.apache.hadoop.hbase.replication.ReplicationPeers; import org.apache.hadoop.hbase.replication.ReplicationQueueInfo; import org.apache.hadoop.hbase.replication.ReplicationQueueStorage; @@ -747,6 +748,13 @@ public class ReplicationSourceManager implements ReplicationListener { abortWhenFail(() -> queueStorage.removeQueue(server.getServerName(), queueId)); continue; } + if (server instanceof ReplicationSyncUp.DummyServer + && peer.getPeerState().equals(PeerState.DISABLED)) { + LOG.warn("Peer {} is disbaled. ReplicationSyncUp tool will skip " + + "replicating data to this peer.", + actualPeerId); + continue; + } // track sources in walsByIdRecoveredQueues Map<String, SortedSet<String>> walsByGroup = new HashMap<>(); walsByIdRecoveredQueues.put(queueId, walsByGroup);