Reid Chan created HBASE-25195:
---------------------------------
Summary: [branch-1] getNumOpenConnections is not effective
Key: HBASE-25195
URL: https://issues.apache.org/jira/browse/HBASE-25195
Project: HBase
Issue Type: Improvement
Components: metrics
Environment: In MetricsHBaseServerWrapperImpl
{code}
@Override
public int getNumOpenConnections() {
if (!isServerStarted() || this.server.connectionList == null) {
return 0;
}
return server.connectionList.size();
}
{code}
But connectionList is created by Collections.synchronizedList(new
LinkedList<Connection>());
So each connectionList.size() will compete for the mutex, we can easily replace
it with another parameter *numConnections*, as for metrics, it is enough.
Reporter: Reid Chan
Assignee: Reid Chan
Fix For: 1.7.0
--
This message was sent by Atlassian Jira
(v8.3.4#803005)