diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java index bd5b7736f3b9..272c14308e24 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceWALReader.java @@ -69,6 +69,7 @@ class ReplicationSourceWALReader extends Thread { // position in the WAL to start reading at private long currentPosition; private final long sleepForRetries; + private final long sleepForQuotaCheck; private final int maxRetriesMultiplier; // Indicates whether this particular worker is running @@ -102,6 +103,8 @@ public ReplicationSourceWALReader(FileSystem fs, Configuration conf, int batchCount = conf.getInt("replication.source.nb.batches", 1); // 1 second this.sleepForRetries = this.conf.getLong("replication.source.sleepforretries", 1000); + // 300ms + this.sleepForQuotaCheck = this.conf.getLong("replication.source.sleepforquotacheck", 300); // 5 minutes @ 1 sec per this.maxRetriesMultiplier = this.conf.getInt("replication.source.maxretriesmultiplier", 300); this.entryBatchQueue = new LinkedBlockingQueue<>(batchCount); @@ -270,7 +273,7 @@ public Path getCurrentPath() { private boolean checkBufferQuota() { // try not to go over total quota if (!this.getSourceManager().checkBufferQuota(this.source.getPeerId())) { - Threads.sleep(sleepForRetries); + Threads.sleep(sleepForQuotaCheck); return false; } return true;