From 86cf14889462b6947f921c41401a8f925fe2b3b6 Mon Sep 17 00:00:00 2001 From: tedyu Date: Mon, 21 Sep 2015 07:23:14 -0700 Subject: [PATCH] HBASE-14431 Addendum checks for null connectionInPool (Yu Li) --- .../main/java/org/apache/hadoop/hbase/ipc/AsyncRpcClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AsyncRpcClient.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AsyncRpcClient.java index 876eb70b84e..e1662f3852c 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AsyncRpcClient.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AsyncRpcClient.java @@ -403,7 +403,7 @@ public class AsyncRpcClient extends AbstractRpcClient { // we use address as cache key, so we should check here to prevent removing the // wrong connection AsyncRpcChannel connectionInPool = this.connections.get(connectionHashCode); - if (connectionInPool.equals(connection)) { + if (connectionInPool != null && connectionInPool.equals(connection)) { this.connections.remove(connectionHashCode); } else if (LOG.isDebugEnabled()) { LOG.debug(String.format("%s already removed, expected instance %08x, actual %08x",