HBASE-19905 ReplicationSyncUp tool will not exit if a peer replication is disabled
Signed-off-by: Ashish Singhi <ashishsinghi@apache.org>
This commit is contained in:
parent
3b603d2c08
commit
2d5b36d194
|
@ -56,6 +56,7 @@ import org.apache.hadoop.hbase.replication.ReplicationEndpoint;
|
||||||
import org.apache.hadoop.hbase.replication.ReplicationException;
|
import org.apache.hadoop.hbase.replication.ReplicationException;
|
||||||
import org.apache.hadoop.hbase.replication.ReplicationListener;
|
import org.apache.hadoop.hbase.replication.ReplicationListener;
|
||||||
import org.apache.hadoop.hbase.replication.ReplicationPeer;
|
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.ReplicationPeerConfig;
|
||||||
import org.apache.hadoop.hbase.replication.ReplicationPeers;
|
import org.apache.hadoop.hbase.replication.ReplicationPeers;
|
||||||
import org.apache.hadoop.hbase.replication.ReplicationQueueInfo;
|
import org.apache.hadoop.hbase.replication.ReplicationQueueInfo;
|
||||||
|
@ -739,6 +740,13 @@ public class ReplicationSourceManager implements ReplicationListener {
|
||||||
replicationQueues.removeQueue(peerId);
|
replicationQueues.removeQueue(peerId);
|
||||||
continue;
|
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
|
// track sources in walsByIdRecoveredQueues
|
||||||
Map<String, SortedSet<String>> walsByGroup = new HashMap<>();
|
Map<String, SortedSet<String>> walsByGroup = new HashMap<>();
|
||||||
walsByIdRecoveredQueues.put(peerId, walsByGroup);
|
walsByIdRecoveredQueues.put(peerId, walsByGroup);
|
||||||
|
|
Loading…
Reference in New Issue