Skip to content

Commit

Permalink
HBASE-22616 responseTooXXX logging for Multi should characterize the …
Browse files Browse the repository at this point in the history
…component ops (#329)

Signed-off-by: Reid Chan <reidchan@apache.org>
Signed-off-by: Michael Stack <stack@apache.org>
  • Loading branch information
apurtell committed Jun 25, 2019
1 parent d0cb77c commit 581198e
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,28 @@ void logResponse(Message param, String methodName, String call, String tag,
}
}
}
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 + "): " + GSON.toJson(responseInfo));
}

Expand Down

0 comments on commit 581198e

Please sign in to comment.