zhuyaogai commented on code in PR #5224:
URL: https://github.com/apache/hbase/pull/5224#discussion_r1199903059


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java:
##########
@@ -652,7 +652,27 @@ public void updateRpc(MethodDescriptor method, Message 
param, CallStats stats, T
       concurrentCallsPerServerHist.update(callsPerServer);
     }
     // Update the counter that tracks RPCs by type.
-    final String methodName = method.getService().getName() + "_" + 
method.getName();
+    String methodName = method.getService().getName() + "_" + method.getName();
+    // Distinguish mutate types.
+    if ("Mutate".equals(method.getName())) {
+      final MutationType type = ((MutateRequest) 
param).getMutation().getMutateType();
+      switch (type) {
+        case APPEND:
+          methodName += "(Append)";
+          break;
+        case DELETE:
+          methodName += "(Delete)";
+          break;
+        case INCREMENT:
+          methodName += "(Increment)";
+          break;
+        case PUT:
+          methodName += "(Put)";
+          break;
+        default:
+          throw new RuntimeException("Unrecognized mutation type " + type);

Review Comment:
   Resolved it.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to