You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by wc...@apache.org on 2025/09/30 12:03:11 UTC
(hbase) branch branch-2 updated: HBASE-29629 Record the quota user name value on metrics for RpcThrottlingExceptions (#7345)
This is an automated email from the ASF dual-hosted git repository.
wchevreuil pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 0e92216d62f HBASE-29629 Record the quota user name value on metrics for RpcThrottlingExceptions (#7345)
0e92216d62f is described below
commit 0e92216d62f6d32891af710123e0f7696e1cbcd3
Author: Siddharth Khillon <si...@gmail.com>
AuthorDate: Tue Sep 30 04:13:38 2025 -0700
HBASE-29629 Record the quota user name value on metrics for RpcThrottlingExceptions (#7345)
Signed-off-by: Wellington Chevreuil <wc...@apache.org>
---
.../src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java | 2 +-
.../org/apache/hadoop/hbase/quotas/RegionServerRpcQuotaManager.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java
index 16681eb45f8..325f31586c5 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java
@@ -229,7 +229,7 @@ public class QuotaCache implements Stoppable {
* username
* @param ugi The request's UserGroupInformation
*/
- private String getQuotaUserName(final UserGroupInformation ugi) {
+ String getQuotaUserName(final UserGroupInformation ugi) {
if (userOverrideRequestAttributeKey == null) {
return ugi.getShortUserName();
}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionServerRpcQuotaManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionServerRpcQuotaManager.java
index 7a42d0f1aa3..34fc57cb081 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionServerRpcQuotaManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionServerRpcQuotaManager.java
@@ -199,7 +199,7 @@ public class RegionServerRpcQuotaManager implements RpcQuotaManager, Configurati
LOG.debug("Throttling exception for user=" + ugi.getUserName() + " table=" + table + " scan="
+ scanRequest.getScannerId() + ": " + e.getMessage());
- rsServices.getMetrics().recordThrottleException(e.getType(), ugi.getShortUserName(),
+ rsServices.getMetrics().recordThrottleException(e.getType(), quotaCache.getQuotaUserName(ugi),
table.getNameAsString());
throw e;
@@ -276,7 +276,7 @@ public class RegionServerRpcQuotaManager implements RpcQuotaManager, Configurati
LOG.debug("Throttling exception for user=" + ugi.getUserName() + " table=" + table
+ " numWrites=" + numWrites + " numReads=" + numReads + ": " + e.getMessage());
- rsServices.getMetrics().recordThrottleException(e.getType(), ugi.getShortUserName(),
+ rsServices.getMetrics().recordThrottleException(e.getType(), quotaCache.getQuotaUserName(ugi),
table.getNameAsString());
throw e;