HBASE-11964 Improve spreading replication load from failed regionservers
This commit is contained in:
parent
2916d4f356
commit
97acb9ef24
|
@ -161,7 +161,10 @@ public class ReplicationSource extends Thread
|
|||
this.conf.getLong("replication.source.size.capacity", 1024*1024*64);
|
||||
this.replicationQueueNbCapacity =
|
||||
this.conf.getInt("replication.source.nb.capacity", 25000);
|
||||
this.maxRetriesMultiplier = this.conf.getInt("replication.source.maxretriesmultiplier", 10);
|
||||
this.sleepForRetries =
|
||||
this.conf.getLong("replication.source.sleepforretries", 1000); // 1 second
|
||||
this.maxRetriesMultiplier =
|
||||
this.conf.getInt("replication.source.maxretriesmultiplier", 300); // 5 minutes @ 1 sec per
|
||||
this.queue =
|
||||
new PriorityBlockingQueue<Path>(
|
||||
this.conf.getInt("hbase.regionserver.maxlogs", 32),
|
||||
|
@ -171,8 +174,6 @@ public class ReplicationSource extends Thread
|
|||
this.replicationQueues = replicationQueues;
|
||||
this.replicationPeers = replicationPeers;
|
||||
this.manager = manager;
|
||||
this.sleepForRetries =
|
||||
this.conf.getLong("replication.source.sleepforretries", 1000);
|
||||
this.fs = fs;
|
||||
this.metrics = metrics;
|
||||
this.repLogReader = new ReplicationHLogReaderManager(this.fs, this.conf);
|
||||
|
|
|
@ -137,7 +137,8 @@ public class ReplicationSourceManager implements ReplicationListener {
|
|||
this.fs = fs;
|
||||
this.logDir = logDir;
|
||||
this.oldLogDir = oldLogDir;
|
||||
this.sleepBeforeFailover = conf.getLong("replication.sleep.before.failover", 2000);
|
||||
this.sleepBeforeFailover =
|
||||
conf.getLong("replication.sleep.before.failover", 30000); // 30 seconds
|
||||
this.clusterId = clusterId;
|
||||
this.replicationTracker.registerListener(this);
|
||||
this.replicationPeers.getAllPeerIds();
|
||||
|
|
|
@ -99,6 +99,8 @@ public class TestReplicationBase {
|
|||
conf1.setLong(HConstants.THREAD_WAKE_FREQUENCY, 100);
|
||||
conf1.setInt("replication.stats.thread.period.seconds", 5);
|
||||
conf1.setBoolean("hbase.tests.use.shortcircuit.reads", false);
|
||||
conf1.setLong("replication.sleep.before.failover", 2000);
|
||||
conf1.setInt("replication.source.maxretriesmultiplier", 10);
|
||||
|
||||
utility1 = new HBaseTestingUtility(conf1);
|
||||
utility1.startMiniZKCluster();
|
||||
|
|
|
@ -129,6 +129,8 @@ public class TestReplicationSourceManager {
|
|||
ReplicationSourceDummy.class.getCanonicalName());
|
||||
conf.setBoolean(HConstants.REPLICATION_ENABLE_KEY,
|
||||
HConstants.REPLICATION_ENABLE_DEFAULT);
|
||||
conf.setLong("replication.sleep.before.failover", 2000);
|
||||
conf.setInt("replication.source.maxretriesmultiplier", 10);
|
||||
utility = new HBaseTestingUtility(conf);
|
||||
utility.startMiniZKCluster();
|
||||
|
||||
|
|
Loading…
Reference in New Issue