From ca8acad3e0f4a5f3824c9761dc9f38f67637686a Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Fri, 12 Sep 2014 17:39:10 -0700 Subject: [PATCH] HBASE-11964 Improve spreading replication load from failed regionservers (Lars Hofhansl) --- .../hadoop/hbase/replication/regionserver/ReplicationSource.java | 7 ++++--- .../hbase/replication/regionserver/ReplicationSourceManager.java | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java index 74424e6..d428cbe 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java @@ -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( 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); 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 e196588..f2c5c1b 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 @@ -135,7 +135,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(); -- 1.8.5.2 (Apple Git-48)