From 922ced0d0850b678705140d9bd5f9bae17f06d4a Mon Sep 17 00:00:00 2001 From: Enis Soztutar Date: Wed, 8 Oct 2014 17:48:36 -0700 Subject: [PATCH] HBASE-12200 When a Rpc server handler thread dies, throws exception (Alicia Ying Shu) --- .../main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java index eea29ca9b41..5fe259076d9 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcExecutor.java @@ -18,8 +18,6 @@ package org.apache.hadoop.hbase.ipc; -import java.io.IOException; - import java.util.ArrayList; import java.util.List; import java.util.concurrent.BlockingQueue; @@ -29,10 +27,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.classification.InterfaceAudience; import org.apache.hadoop.hbase.classification.InterfaceStability; -import org.apache.hadoop.conf.Configuration; import com.google.common.base.Strings; -import com.google.common.collect.Lists; @InterfaceAudience.Private @InterfaceStability.Evolving @@ -112,6 +108,9 @@ public abstract class RpcExecutor { try { activeHandlerCount.incrementAndGet(); task.run(); + } catch (Throwable t) { + LOG.error("RpcServer handler thread throws exception: ", t); + throw t; } finally { activeHandlerCount.decrementAndGet(); }