Riza Suminto has uploaded this change for review. (
http://gerrit.cloudera.org:8080/17077
Change subject: IMPALA-10509: Add tool to visualize Impala query plan from
profile
......................................................................
IMPALA-10509: Add tool to visualize Impala query plan from profile
Impala query plan can be huge and complex. It becomes hard to analyze
this complex query plan, its execution summary, and the runtime filter
interactions from the query profile. We need tool to help visualize this
query plan from plain text query profile.
This commit adds experimental python3 script plan-graph.py to parse the
text profile into a GraphViz DOT format. The output of this script can
then be converted into image using dot program or immediately visualized
using program such as ZGRViewer.
The script can produce graph in the following verbosity levels:
* 0: minimal graph, containing the concise query plan, time spent on
each plan node, and number of rows produced.
* 1: level 0 graph plus additional runtime filter vertices.
* 2: level 1 graph with additional description in query plan vertices
such as the plan node parameter, selective predicates, groupby
clause, runtime filter info, etc. The runtime filter vertices also
arranged to lower position than scan nodes that should finished
before the runtime filter published. This is currenty the default
verbosity level.
* 3: level 2 graph with scanner to runtime filter dependency edges
explicitly drawn.
Testing:
- Manually test the script against query profiles from TPC-DS runs and
verify that it produce a valid graph visualization.
Change-Id: Ic62e3c2b061dd2b84589336fb9e68fa1eccf76f2
---
A bin/diagnostics/experimental/plan-graph.py
1 file changed, 631 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/77/17077/1
--
To view, visit http://gerrit.cloudera.org:8080/17077
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic62e3c2b061dd2b84589336fb9e68fa1eccf76f2
Gerrit-Change-Number: 17077
Gerrit-PatchSet: 1
Gerrit-Owner: Riza Suminto <[email protected]>