Repository: hbase
Updated Branches:
  refs/heads/branch-1.4 1eef181a5 -> bde2b69a4


HBASE-19905 ReplicationSyncUp tool will not exit if a peer replication is 
disabled

Signed-off-by: Ashish Singhi <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/bde2b69a
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/bde2b69a
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/bde2b69a

Branch: refs/heads/branch-1.4
Commit: bde2b69a49470685fda59b883435d4421865999f
Parents: 1eef181
Author: Ashish Singhi <[email protected]>
Authored: Sun Feb 4 18:24:32 2018 +0530
Committer: Andrew Purtell <[email protected]>
Committed: Tue Feb 6 16:01:15 2018 -0800

----------------------------------------------------------------------
 .../replication/regionserver/ReplicationSourceManager.java    | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/bde2b69a/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 74dded7..5686fa6 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
@@ -58,6 +58,7 @@ import 
org.apache.hadoop.hbase.replication.ReplicationEndpoint;
 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.ReplicationPeerConfig;
 import org.apache.hadoop.hbase.replication.ReplicationPeers;
 import org.apache.hadoop.hbase.replication.ReplicationQueueInfo;
@@ -736,6 +737,12 @@ public class ReplicationSourceManager implements 
ReplicationListener {
             replicationQueues.removeQueue(peerId);
             continue;
           }
+          if (server instanceof ReplicationSyncUp.DummyServer
+              && peer.getPeerState().equals(PeerState.DISABLED)) {
+            LOG.warn("Peer " + actualPeerId + " is disbaled. ReplicationSyncUp 
tool will skip "
+                + "replicating data to this peer.");
+            continue;
+          }
           // track sources in walsByIdRecoveredQueues
           Map<String, SortedSet<String>> walsByGroup = new HashMap<String, 
SortedSet<String>>();
           walsByIdRecoveredQueues.put(peerId, walsByGroup);

Reply via email to