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>
This commit is contained in:
parent
360288a320
commit
a1aab9514f
|
@ -517,6 +517,28 @@ public abstract class RpcServer implements RpcServerInterface,
|
|||
}
|
||||
}
|
||||
}
|
||||
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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue