From 8855670cd701fdf9c2ab41907f9525d122608e6d Mon Sep 17 00:00:00 2001 From: tedyu Date: Mon, 12 Sep 2016 15:49:23 -0700 Subject: [PATCH] HBASE-16616 Rpc handlers stuck on ThreadLocalMap.expungeStaleEntry (Tomu Tsuruhara) --- .../src/main/java/org/apache/hadoop/hbase/util/Counter.java | 4 ++++ .../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 1 + 2 files changed, 5 insertions(+) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Counter.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Counter.java index 7b8a7e9c3f8..92c0a8f54db 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Counter.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Counter.java @@ -181,6 +181,10 @@ public class Counter { return sum; } + public void destroy() { + indexHolderThreadLocal.remove(); + } + @Override public String toString() { Cell[] cells = containerRef.get().cells; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java index 0df5097ab08..a6782377f58 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java @@ -1957,6 +1957,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { LOG.trace("Ignored exception", ignored); } } + rpcCount.destroy(); } private UserGroupInformation createUser(ConnectionHeader head) {