Skip to content

Commit a1aab95

Browse files
committed
HBASE-22616 responseTooXXX logging for Multi should characterize the component ops (#329)
Signed-off-by: Reid Chan <reidchan@apache.org> Signed-off-by: Michael Stack <stack@apache.org>
1 parent 360288a commit a1aab95

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,28 @@ void logResponse(Message param, String methodName, String call, String tag,
517517
}
518518
}
519519
}
520+
if (param instanceof ClientProtos.MultiRequest) {
521+
int numGets = 0;
522+
int numMutations = 0;
523+
int numServiceCalls = 0;
524+
ClientProtos.MultiRequest multi = (ClientProtos.MultiRequest)param;
525+
for (ClientProtos.RegionAction regionAction : multi.getRegionActionList()) {
526+
for (ClientProtos.Action action: regionAction.getActionList()) {
527+
if (action.hasMutation()) {
528+
numMutations++;
529+
}
530+
if (action.hasGet()) {
531+
numGets++;
532+
}
533+
if (action.hasServiceCall()) {
534+
numServiceCalls++;
535+
}
536+
}
537+
}
538+
responseInfo.put("multi.gets", numGets);
539+
responseInfo.put("multi.mutations", numMutations);
540+
responseInfo.put("multi.servicecalls", numServiceCalls);
541+
}
520542
LOG.warn("(response" + tag + "): " + MAPPER.writeValueAsString(responseInfo));
521543
}
522544

0 commit comments

Comments
 (0)