You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2019/06/25 01:08:59 UTC
[hbase] branch branch-1 updated: HBASE-22616 responseTooXXX logging
for Multi should characterize the component ops
This is an automated email from the ASF dual-hosted git repository.
apurtell pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-1 by this push:
new 5023690 HBASE-22616 responseTooXXX logging for Multi should characterize the component ops
5023690 is described below
commit 5023690c84b78eb97fa4e70983b639c081bc7e2c
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Fri Jun 21 14:33:49 2019 -0700
HBASE-22616 responseTooXXX logging for Multi should characterize the component ops
---
.../org/apache/hadoop/hbase/ipc/RpcServer.java | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
index efc7f89..a70c575 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
@@ -2502,6 +2502,28 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver {
}
}
}
+ if (param instanceof ClientProtos.MultiRequest) {
+ int numGets = 0;
+ int numMutations = 0;
+ int numServiceCalls = 0;
+ ClientProtos.MultiRequest multi = (ClientProtos.MultiRequest)param;
+ for (ClientProtos.RegionAction regionAction : multi.getRegionActionList()) {
+ for (ClientProtos.Action action: regionAction.getActionList()) {
+ if (action.hasMutation()) {
+ numMutations++;
+ }
+ if (action.hasGet()) {
+ numGets++;
+ }
+ if (action.hasServiceCall()) {
+ numServiceCalls++;
+ }
+ }
+ }
+ responseInfo.put("multi.gets", numGets);
+ responseInfo.put("multi.mutations", numMutations);
+ responseInfo.put("multi.servicecalls", numServiceCalls);
+ }
LOG.warn("(response" + tag + "): " + MAPPER.writeValueAsString(responseInfo));
}