Skip to content

Commit

Permalink
HBASE-27268 In trace log mode, the client does not print callId/start…
Browse files Browse the repository at this point in the history
…Time and the server does not print receiveTime (#4710)

Co-authored-by: jay.zhu <jay.zhu@huolala.cn>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
  • Loading branch information
Fantasy-Jay and jay.zhu committed Aug 20, 2022
1 parent 74fd5b2 commit 32c135d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ private void onCallFinished(Call call, HBaseRpcController hrc, Address addr,
metrics.updateRpc(call.md, call.param, call.callStats);
}
if (LOG.isTraceEnabled()) {
LOG.trace(
"Call: " + call.md.getName() + ", callTime: " + call.callStats.getCallTimeMs() + "ms");
LOG.trace("CallId: {}, call: {}, startTime: {}ms, callTime: {}ms", call.id, call.md.getName(),
call.getStartTime(), call.callStats.getCallTimeMs());
}
if (call.error != null) {
if (call.error instanceof RemoteException) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,10 @@ public Pair<Message, CellScanner> call(RpcCall call, MonitoredRPCHandler status)
int qTime = (int) (startTime - receiveTime);
int totalTime = (int) (endTime - receiveTime);
if (LOG.isTraceEnabled()) {
LOG.trace(CurCall.get().toString() + ", response " + TextFormat.shortDebugString(result)
+ " queueTime: " + qTime + " processingTime: " + processingTime + " totalTime: "
+ totalTime);
LOG.trace(
"{}, response: {}, receiveTime: {}, queueTime: {}, processingTime: {}, totalTime: {}",
CurCall.get().toString(), TextFormat.shortDebugString(result),
CurCall.get().getReceiveTime(), qTime, processingTime, totalTime);
}
// Use the raw request call size for now.
long requestSize = call.getSize();
Expand Down

0 comments on commit 32c135d

Please sign in to comment.