Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/18846 )
Change subject: [Client] Add query id to trace the whole query process ...................................................................... [Client] Add query id to trace the whole query process In Impala, an SQL is translated into a query plan. The query plan contains multiple execution units and is executed at different hosts of a cluster in a distributed manner. There exists an unique query id to trace the execution process of every execution unit. It is useful in analysis of stuck, failed, and otherwise non-performant queries. Query id can associate all log records in different hosts, which belongs to one query. Scanning a Kudu table is split into multiple scan operations on appropriate tablets, one scanner per tablet. When scanning a Kudu table using Impala, corresponding scan nodes appear for every scanner in the Impala's query plan. Scanner id is used to trace the scan operation on a tablet. But there is a gap between Impala and Kudu. We can't trace the whole scanning process in Kudu of a query originated from Impala. There is not unique id to associate the execution of all scanners in Kudu. Therefore, with this patch it is now possible to post Impala's query identifier to Kudu, so it can be associated with Kudu's scanner id. Then we can trace a query from Impala to Kudu for troubleshooting and debugging. Change-Id: I9dbae801596726fec1c85ee547128da3179345d9 Reviewed-on: http://gerrit.cloudera.org:8080/18846 Tested-by: Alexey Serbin <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> --- M src/kudu/client/client-test.cc M src/kudu/client/client.cc M src/kudu/client/client.h M src/kudu/client/client.proto M src/kudu/client/scan_token-internal.cc M src/kudu/client/scan_token-internal.h M src/kudu/client/scan_token-test.cc M src/kudu/client/scanner-internal.cc M src/kudu/tserver/tablet_server-test.cc M src/kudu/tserver/tablet_service.cc M src/kudu/tserver/tserver.proto 11 files changed, 197 insertions(+), 13 deletions(-) Approvals: Alexey Serbin: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/18846 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9dbae801596726fec1c85ee547128da3179345d9 Gerrit-Change-Number: 18846 Gerrit-PatchSet: 32 Gerrit-Owner: Wang Xixu <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Jian Zhang <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mahesh Reddy <[email protected]> Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Wang Xixu <[email protected]> Gerrit-Reviewer: Yifan Zhang <[email protected]> Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Reviewer: Yuqi Du <[email protected]>
