hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecl...@apache.org
Subject hbase git commit: HBASE-14953 Replication: retry on RejectedExecutionException
Date Fri, 11 Dec 2015 21:21:46 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 ac6a57b6b -> daa755801


HBASE-14953 Replication: retry on RejectedExecutionException

In HBaseInterClusterReplicationEndpoint, we fail the whole batch
in case of a RejectedExecutionException on an individual sub-batch.
We should let the submitted sub-batches finish and retry only for
the remaining ones.

Signed-off-by: Elliott Clark <eclark@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/daa75580
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/daa75580
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/daa75580

Branch: refs/heads/branch-1.2
Commit: daa755801fda34203f6eef9ae8331d99aaa2c2cd
Parents: ac6a57b
Author: Ashu Pachauri <ashu210890@gmail.com>
Authored: Tue Dec 8 14:25:41 2015 -0800
Committer: Elliott Clark <eclark@apache.org>
Committed: Fri Dec 11 13:17:47 2015 -0800

----------------------------------------------------------------------
 .../regionserver/HBaseInterClusterReplicationEndpoint.java   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/daa75580/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java
index d351927..8f77065 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java
@@ -29,7 +29,7 @@ import java.util.concurrent.CompletionService;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorCompletionService;
 import java.util.concurrent.Future;
-import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
@@ -107,8 +107,10 @@ public class HBaseInterClusterReplicationEndpoint extends HBaseReplicationEndpoi
     // per sink thread pool
     this.maxThreads = this.conf.getInt(HConstants.REPLICATION_SOURCE_MAXTHREADS_KEY,
       HConstants.REPLICATION_SOURCE_MAXTHREADS_DEFAULT);
-    this.exec = new ThreadPoolExecutor(1, maxThreads, 60, TimeUnit.SECONDS,
-      new SynchronousQueue<Runnable>());
+
+    this.exec = new ThreadPoolExecutor(maxThreads, maxThreads, 60, TimeUnit.SECONDS,
+        new LinkedBlockingQueue<Runnable>());
+    this.exec.allowCoreThreadTimeOut(true);
   }
 
   private void decorateConf() {


Mime
View raw message