Skip to content
Permalink
Browse files
HBASE-23641 Use ReplicationPeerConfig.needToReplicate in HBaseFsck (#51)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
  • Loading branch information
petersomogyi committed Jan 8, 2020
1 parent 53d570a commit 3d76e06ccb9d1ac0019e752074db8d934e9b3211
Showing 1 changed file with 3 additions and 4 deletions.
@@ -125,7 +125,6 @@
import org.apache.hadoop.hbase.replication.ReplicationPeerDescription;
import org.apache.hadoop.hbase.replication.ReplicationQueueStorage;
import org.apache.hadoop.hbase.replication.ReplicationStorageFactory;
import org.apache.hadoop.hbase.replication.ReplicationUtils;
import org.apache.hadoop.hbase.security.AccessDeniedException;
import org.apache.hadoop.hbase.security.UserProvider;
import org.apache.hadoop.hbase.util.Bytes;
@@ -5547,9 +5546,9 @@ public void cleanReplicationBarrier() throws IOException {
List<ReplicationPeerDescription> peerDescriptions = admin.listReplicationPeers();
if (peerDescriptions != null && peerDescriptions.size() > 0) {
List<String> peers = peerDescriptions.stream()
.filter(peerConfig -> ReplicationUtils.contains(peerConfig.getPeerConfig(),
cleanReplicationBarrierTable))
.map(peerConfig -> peerConfig.getPeerId()).collect(Collectors.toList());
.filter(peerConfig -> peerConfig.getPeerConfig()
.needToReplicate(cleanReplicationBarrierTable))
.map(ReplicationPeerDescription::getPeerId).collect(Collectors.toList());
try {
List<String> batch = new ArrayList<>();
for (String peer : peers) {

0 comments on commit 3d76e06

Please sign in to comment.