This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 8a10dbf6c46 HBASE-27268 In trace log mode, the client does not print 
callId/startTime and the server does not print receiveTime (#4710)
8a10dbf6c46 is described below

commit 8a10dbf6c469099f352b54ae73c3d829cc6b976e
Author: Fantasy-Jay <[email protected]>
AuthorDate: Sat Aug 20 20:50:40 2022 +0800

    HBASE-27268 In trace log mode, the client does not print callId/startTime 
and the server does not print receiveTime (#4710)
    
    Co-authored-by: jay.zhu <[email protected]>
    Signed-off-by: Duo Zhang <[email protected]>
    (cherry picked from commit 32c135d8a552970e592ed39735186b4364f85ed1)
---
 .../main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java   | 4 ++--
 .../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java       | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
index e5863948a58..0afd07d7951 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/AbstractRpcClient.java
@@ -379,8 +379,8 @@ public abstract class AbstractRpcClient<T extends 
RpcConnection> implements RpcC
       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) {
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
index 2ca86f57f74..66d5b8f43d8 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
@@ -390,9 +390,10 @@ public abstract class RpcServer implements 
RpcServerInterface, ConfigurationObse
       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();

Reply via email to