From d3ac3420e5b9c7ba39497fc9c86e5a47c0332eb1 Mon Sep 17 00:00:00 2001 From: Reid Chan Date: Mon, 19 Oct 2020 10:54:15 +0800 Subject: [PATCH] HBASE-25195 [branch-1] getNumOpenConnections is not effective (#2557) Signed-off-by: Viraj Jasani --- .../hadoop/hbase/ipc/MetricsHBaseServerWrapperImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerWrapperImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerWrapperImpl.java index 6ba7ea240bb..2f3745f03a5 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerWrapperImpl.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerWrapperImpl.java @@ -65,10 +65,10 @@ public class MetricsHBaseServerWrapperImpl implements MetricsHBaseServerWrapper @Override public int getNumOpenConnections() { - if (!isServerStarted() || this.server.connectionList == null) { + if (!isServerStarted()) { return 0; } - return server.connectionList.size(); + return server.numConnections; } @Override