Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add query task count to statistics field of QueryCompletedEvent #13334

Merged
merged 1 commit into from
Sep 5, 2019

Conversation

viczhang861
Copy link
Contributor

== RELEASE NOTES ==

General Changes
* Add peak running task count to statistics field of QueryCompletedEvent

Copy link
Contributor

@mayankgarg1990 mayankgarg1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@arhimondr arhimondr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % nit

@@ -26,6 +26,7 @@
private final Duration queuedTime;
private final Optional<Duration> analysisTime;

private final int peakRunningTaskCount;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: How about simply peakRunningTasks (similarly to completedSplits)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most other classes use peakRunningTaskCount, let's keep as it is

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In query stats it is peakRunningTasks: https://github.com/prestodb/presto/blob/master/presto-main/src/main/java/com/facebook/presto/execution/QueryStats.java#L58.
In SqlQueryManager it is peakRunningTasks, peakRunningTasksStat: https://github.com/prestodb/presto/blob/master/presto-main/src/main/java/com/facebook/presto/execution/SqlQueryManagerStats.java#L94

Only in QueryStateMachine it is peakRunningTaskCount (because of currentRunningTaskCount).

Thus for consistency i would keep it as peakRunningTasks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QueryStats uses totalTasksfirst, then SqlQueryManagerStats uses peakRunningTasks as it is constructed from QueryStats

Given completedSplits is already used here, it makes sense to keep the same style, but let's use peakRunningTaskCount in other places whenever possible.

@arhimondr arhimondr merged commit 2de28d2 into prestodb:master Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants