This is an automated email from the ASF dual-hosted git repository.

wchevreuil pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.6 by this push:
     new 7342b931529 HBASE-29629 Record the quota user name value on metrics 
for RpcThrottlingExceptions (#7345)
7342b931529 is described below

commit 7342b931529f4722f0c485d3ecd2eb0a706a7e84
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 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;

Reply via email to