This is an automated email from the ASF dual-hosted git repository.
wchevreuil pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new 2c3b89b61c3 HBASE-29629 Record the quota user name value on metrics
for RpcThrottlingExceptions (#7345)
2c3b89b61c3 is described below
commit 2c3b89b61c3d03f598ba8ed7f917a93bf797566d
Author: Siddharth Khillon <[email protected]>
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 <[email protected]>
---
.../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 6b1585c5855..e912fe8ee15 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;