You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/12/20 03:46:21 UTC
[GitHub] [hbase] vli02 commented on a diff in pull request #4929: HBASE-27540: add client side counter metrics for failed rpc calls.
vli02 commented on code in PR #4929:
URL: https://github.com/apache/hbase/pull/4929#discussion_r1052852449
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java:
##########
@@ -637,14 +637,17 @@ private void shutdown() {
}
/** Report RPC context to metrics system. */
- public void updateRpc(MethodDescriptor method, Message param, CallStats stats) {
+ public void updateRpc(MethodDescriptor method, Message param, CallStats stats, boolean failed) {
int callsPerServer = stats.getConcurrentCallsPerServer();
if (callsPerServer > 0) {
concurrentCallsPerServerHist.update(callsPerServer);
}
// Update the counter that tracks RPCs by type.
final String methodName = method.getService().getName() + "_" + method.getName();
getMetric(CNT_BASE + methodName, rpcCounters, counterFactory).inc();
+ if (failed) {
+ getMetric(CNT_BASE + methodName + "_Failure", rpcCounters, counterFactory).inc();
Review Comment:
Update with your suggestion, please take a look. Thanks!
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java:
##########
@@ -637,14 +637,17 @@ private void shutdown() {
}
/** Report RPC context to metrics system. */
- public void updateRpc(MethodDescriptor method, Message param, CallStats stats) {
+ public void updateRpc(MethodDescriptor method, Message param, CallStats stats, boolean failed) {
int callsPerServer = stats.getConcurrentCallsPerServer();
if (callsPerServer > 0) {
concurrentCallsPerServerHist.update(callsPerServer);
}
// Update the counter that tracks RPCs by type.
final String methodName = method.getService().getName() + "_" + method.getName();
getMetric(CNT_BASE + methodName, rpcCounters, counterFactory).inc();
+ if (failed) {
+ getMetric(CNT_BASE + methodName + "_Failure", rpcCounters, counterFactory).inc();
Review Comment:
Updated with your suggestion, please take a look. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org