From 8ad14bac6728792bee2b0deab0d65c8e083f4f19 Mon Sep 17 00:00:00 2001 From: tedyu Date: Mon, 12 Sep 2016 16:29:24 -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 1576c2aadf6..854573ad54f 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 @@ -2003,6 +2003,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { LOG.trace(ignored); } } + rpcCount.destroy(); } private UserGroupInformation createUser(ConnectionHeader head) {