feat: runtime stage's metrics rendering#1778
Conversation
157b9d8 to
ba87335
Compare
milenkovicm
left a comment
There was a problem hiding this comment.
thanks @sandugood
suggestion, can we have three options for this
- no metrics, (default) same behaviour like we had
- tree render
- with metrics, user requested
|
Introduced a new enum (which has a default value). Going to add info about the API change to PR's overview |
| /// ?plan_format=default => plain indent, no metrics | ||
| #[default] | ||
| Default, | ||
| /// ?plan_format=tree => tree render, no metrics |
There was a problem hiding this comment.
Please also update the parameter name at https://github.com/apache/datafusion-ballista/blob/main/ballista-cli/src/tui/http_client.rs#L132
We can add support for metrics in a follow-up.
There was a problem hiding this comment.
Fixed. After this one gets merged I can take care of the tui part, if you dont mind
There was a problem hiding this comment.
There was a problem hiding this comment.
Changed that script with a new -m param
milenkovicm
left a comment
There was a problem hiding this comment.
Few minor comments, will try it tomorrow, may have a bit more
Which issue does this PR close?
Closes #1743 .
Rationale for this change
Right now we don't expose stage-level metrics via Scheduler's REST API interface. We only have task level metrics (which are essential and explanatory by themselves, but not full).
What changes are included in this PR?
Introduced a new query parameter (
PlanFormat) enum, which can beDefault(no metrics and tree-style rendering; for backward compatibility),Tree(tree-style rendering) andMetrics(metrics of each stage of the execution)format_nodeis responsible for rendering the metrics in right orderResults for a
tpchgen-cli -s 1 --format parquet --output-dir testdatagenerated dataset with metrics rendering.Are there any user-facing changes?
No, because users can continue to use
/api/job/{job_id}/stageswithout a query parameter. Usingplan_format=treeorplan_format=metricsis optional