This is an automated email from the ASF dual-hosted git repository.
lokiore pushed a commit to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/5.2 by this push:
new e36651c8bd PHOENIX-7546 :- When hbase client metrics is enabled set
hbase client metrics scope (#2089) (#2093)
e36651c8bd is described below
commit e36651c8bd7c3352446952166ea52809f6c89805
Author: Lokesh Khurana <[email protected]>
AuthorDate: Tue Mar 18 17:06:07 2025 -0500
PHOENIX-7546 :- When hbase client metrics is enabled set hbase client
metrics scope (#2089) (#2093)
---
.../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 303c7a4c08..81ec4c8e7a 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.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP;
import static
org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_15_0;
import static
org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_16_0;
@@ -517,6 +519,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.