This is an automated email from the ASF dual-hosted git repository. lokiore pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push: new 89da2d6fb3 PHOENIX-7546 :- When hbase client metrics is enabled set hbase client metrics scope (#2089) 89da2d6fb3 is described below commit 89da2d6fb33ce7fec34b9cd9ea8ac3e3d0782abd Author: Lokesh Khurana <khuranalokes...@gmail.com> AuthorDate: Mon Mar 17 10:54:25 2025 -0700 PHOENIX-7546 :- When hbase client metrics is enabled set hbase client metrics scope (#2089) --- .../java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phoenix-core-client/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java b/phoenix-core-client/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java index e45e0f7c9c..45f676571f 100644 --- a/phoenix-core-client/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java +++ b/phoenix-core-client/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java @@ -21,6 +21,8 @@ import static org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder.KEEP_ import static org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder.MAX_VERSIONS; import static org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder.REPLICATION_SCOPE; import static org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder.TTL; +import static org.apache.hadoop.hbase.client.MetricsConnection.CLIENT_SIDE_METRICS_ENABLED_KEY; +import static org.apache.hadoop.hbase.client.MetricsConnection.METRICS_SCOPE_KEY; import static org.apache.hadoop.hbase.ipc.RpcControllerFactory.CUSTOM_CONTROLLER_CONF_KEY; import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP; import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_15_0; @@ -554,6 +556,9 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement .build(); } + if (this.config.getBoolean(CLIENT_SIDE_METRICS_ENABLED_KEY, false)) { + this.config.set(METRICS_SCOPE_KEY, config.get(QUERY_SERVICES_NAME)); + } if (!QueryUtil.isServerConnection(props)) { //Start queryDistruptor everytime as log level can be change at connection level as well, but we can avoid starting for server connections.