Jean-Daniel Cryans has submitted this change and it was merged.

Change subject: [java client] Implement RPC tracing, part 1
......................................................................


[java client] Implement RPC tracing, part 1

First part of this work is adding the tracing objects and doing the tracing. A 
second
patch will make this information available to users.

This patch is using a pretty simple method of just
shoving container objects into a list, per RPC. The traces are lightweight
and don't try anything fancy. We also introduce the concept of "parent RPC", so 
that say
a Write RPC spawns a GetTableLocations, and the latter will be added to the 
former
so that the call to the master adds traces to both RPCs.

This patch isn't adding a nice way to present the traces (like JSON) but here's 
a simple
toString example:

RpcTraceFrame{rpcMethod='Write', timestampMs=1477079973547, 
action=SEND_TO_SERVER, server=3926a6a73e994152be1336beb434154e},
RpcTraceFrame{rpcMethod='Write', timestampMs=1477079973548, 
action=RECEIVE_FROM_SERVER, server=3926a6a73e994152be1336beb434154e, 
callStatus=Network error: [Peer 3926a6a73e994152be1336beb434154e] Connection 
reset on [id: 0xc83743df]}
RpcTraceFrame{rpcMethod='Write', timestampMs=1477079973548, 
action=SLEEP_THEN_RETRY, callStatus=Network error: [Peer 
3926a6a73e994152be1336beb434154e] Connection reset on [id: 0xc83743df]},
RpcTraceFrame{rpcMethod='Write', timestampMs=1477079973574, 
action=QUERY_MASTER},
RpcTraceFrame{rpcMethod='GetTableLocations', timestampMs=1477079973574, 
action=SEND_TO_SERVER, server=c0d4588690d241c69821ee773eebd185},
RpcTraceFrame{rpcMethod='GetTableLocations', timestampMs=1477079973576, 
action=RECEIVE_FROM_SERVER, server=c0d4588690d241c69821ee773eebd185, 
callStatus=OK},
RpcTraceFrame{rpcMethod='Write', timestampMs=1477079973579, 
action=PICKED_REPLICA},
RpcTraceFrame{rpcMethod='Write', timestampMs=1477079973579, 
action=SEND_TO_SERVER, server=0353a6d97d6c49f9a727bc1ee6c3393e},

This patch also fixes up some paths where we weren't passing a timeout 
correctly to an
RPC that was created in relation to another RPC (basically paths where the 
parent RPC
had to be set).

Change-Id: I69ef56acc071b9f80b34e38c1821df4096f54907
Reviewed-on: http://gerrit.cloudera.org:8080/4781
Reviewed-by: Dan Burkert <danburk...@apache.org>
Tested-by: Kudu Jenkins
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduScanner.java
M java/kudu-client/src/main/java/org/apache/kudu/client/Batch.java
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduRpc.java
A java/kudu-client/src/main/java/org/apache/kudu/client/RpcTraceFrame.java
M java/kudu-client/src/main/java/org/apache/kudu/client/TabletClient.java
M java/kudu-client/src/test/java/org/apache/kudu/client/BaseKuduTest.java
A java/kudu-client/src/test/java/org/apache/kudu/client/TestRpcTraces.java
8 files changed, 387 insertions(+), 35 deletions(-)

Approvals:
  Dan Burkert: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/4781
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I69ef56acc071b9f80b34e38c1821df4096f54907
Gerrit-PatchSet: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jean-Daniel Cryans <jdcry...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jdcry...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to