Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[java client] Implement RPC tracing, part 2
This patch adds pretty printing for the traces, and makes them always part of KuduRPC.toString. We thus rely on the exceptions' messages to include the RPC's string representation in order to propagate the traces back to the user. In the future we could entertain having the traces in some queryable fashion in KuduException, either by embedding the KuduRpc or just the list of traces. Here's a trace snippet where a tserver that had a leader tablet was killed and we're spinning on finding the new leader: [0ms] sending RPC to server 5df1a37bd7e14380b5a8fceeba6b0d07 [70ms] received from server 5df1a37bd7e14380b5a8fceeba6b0d07 response Network error: [Peer 5df1a37bd7e14380b5a8fceeba6b0d07] Connection reset [70ms] delaying RPC due to Network error: [Peer 5df1a37bd7e14380b5a8fceeba6b0d07] Connection reset [101ms] querying master [101ms] Sub rpc: GetTableLocations sending RPC to server e6e499debd804a8183b85d20a33ad560 [104ms] Sub rpc: GetTableLocations sending RPC to server e6e499debd804a8183b85d20a33ad560 [104ms] Sub rpc: GetTableLocations received from server e6e499debd804a8183b85d20a33ad560 response OK [109ms] sending RPC to server 5df1a37bd7e14380b5a8fceeba6b0d07 [110ms] received from server 5df1a37bd7e14380b5a8fceeba6b0d07 response Network error: [Peer 5df1a37bd7e14380b5a8fceeba6b0d07] Connection reset Change-Id: I2c37143a587971f0e8985c59f4ab1d0c164c3723 Reviewed-on: http://gerrit.cloudera.org:8080/4950 Reviewed-by: Adar Dembo <[email protected]> Tested-by: Kudu Jenkins
- Loading branch information