Skip to content

Commit 15ac781

Browse files
authored
HBASE-22616 responseTooXXX logging for Multi should characterize the component ops (#329)
Signed-off-by: Reid Chan <[email protected]> Signed-off-by: Michael Stack <[email protected]>
1 parent 841b319 commit 15ac781

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
@@ -478,6 +478,28 @@ void logResponse(Message param, String methodName, String call, String tag,
478478
}
479479
}
480480
}
481+
if (param instanceof ClientProtos.MultiRequest) {
482+
int numGets = 0;
483+
int numMutations = 0;
484+
int numServiceCalls = 0;
485+
ClientProtos.MultiRequest multi = (ClientProtos.MultiRequest)param;
486+
for (ClientProtos.RegionAction regionAction : multi.getRegionActionList()) {
487+
for (ClientProtos.Action action: regionAction.getActionList()) {
488+
if (action.hasMutation()) {
489+
numMutations++;
490+
}
491+
if (action.hasGet()) {
492+
numGets++;
493+
}
494+
if (action.hasServiceCall()) {
495+
numServiceCalls++;
496+
}
497+
}
498+
}
499+
responseInfo.put("multi.gets", numGets);
500+
responseInfo.put("multi.mutations", numMutations);
501+
responseInfo.put("multi.servicecalls", numServiceCalls);
502+
}
481503
LOG.warn("(response" + tag + "): " + GSON.toJson(responseInfo));
482504
}
483505

0 commit comments

Comments
 (0)