-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[native] Differentiate number of drivers and number of splits in stats reporting #24671
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
[native] Differentiate number of drivers and number of splits in stats reporting #24671
Conversation
776838c
to
4c23ac5
Compare
fa23157
to
72b0f23
Compare
Nit: In Motivation and Context, suggest changing
to
|
72b0f23
to
2af40d8
Compare
some thoughts for the UI:
|
5671f9e
to
b6fac47
Compare
presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp
Outdated
Show resolved
Hide resolved
@anandamideShakyan Please check the failed tests. You can run the same on your local machine and then if not related, rerun the tests in CI. |
b6fac47
to
fed1ce5
Compare
@nmahadevuni Some refactoring was needed in |
Hi @kewang1024, Could you please elaborate on how does the scheduler uses queuedPartitionedDrivers and runningPartitionedDrivers and where does this comparison happens. In PrestoTask.cpp, as far as I can see that there are no changes done to these two:
My changes are only limited to runningDrivers, totalDrivers, queuedDrivers and completedDrivers, rest are being passed just like before. So changes are only done to TaskStats, TaskStatus class remains the same as before. |
@anandamideShakyan I see, then I think eventually |
I have a quick question, I understand why we want to use new, because it's backward-compatible and after we can switch to new then we can deprecate the old one But if we switch to the name native, then we would not be able to deprecate queueDrivers, runningDrivers, completedDrivers etc, is that correct? Or I might have missed something @aditi-pandit |
@kewang1024 : Didn't entirely follow the question. We do intend to deprecate.. I sort of felt new didn't really represent what the stat was for... Native seemed more understandable. Also, related to do you have any suggestions on how this can be tested ? At IBM our native clusters are new, so we have fewer migration problems than you'll. |
If those would exist, then one would represent java, another would represent cpp, which would be confusing and bug-prone. Ideally we should only have one set of variables to represent both @aditi-pandit could you elaborate a bit more for the intension of creating new ones? |
@kewang1024 : I was given to understand that Meta could advance worker and co-ordinator at different times, so the new fields were introduced for backwards compatiblity. The flow would be as follows...The worker is advanced first, the new fields are unused and the old ones are the same. Then the co-ordinator is moved and we start using the new fields ignoring the old. Then we will do another PR to remove the old fields. |
@aditi-pandit we advance worker and coordinator at different times only when worker is native so what would happen if native worker is updated first, coordinator is not?
native worker starts to populate new fields
but both should be ok, what might I have miss here? |
@kewang1024 : We want to make native worker change (with new fields) a no-op (instead of showing new driver values without new split values). Everything continues to work the same. All the new values (distinguishing between splits and drivers) are correctly populated in UI when the co-ordinator is updated. Post any changes your side for the new values we can remove the old ones. |
@kewang1024 : Wanted to check about this code post our discussions in the Presto Native Worker working group. Do you have any more reservations ? |
@aditi-pandit I think the shortest path makes sense, as long as we address the naming then we should be ok
|
5cbacc4
to
ee83205
Compare
2067cc9
to
8f03125
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @anandamideShakyan. Appreciate the iterations over the code.
@kewang1024 : Please take a look and approve the merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making the changes!
@tdcmeehan @yingsu00 : Please can you help with the review. |
So just to be clear, we will follow up to remove the additional fields after some period of time? |
@tdcmeehan : Yes. |
@anandamideShakyan : This got missed in the PR review, but please merge commits for Presto PRs in logical sets in the future. |
Description
Presto Java reports number of drivers to number of splits in Presto UI because split and driver are 1 to 1 mapping relationship. This is not true in Prestissimo where 1 driver handles many splits. We have to extend the API (protocol::TaskStats and Presto coordinator UI) to have separate splits and drivers information.
This PR updates TaskStats, QueryStats, and BasicQueryStats to separately report driver and split stats:
Motivation and Context
Impact
API Change:
The API now includes separate fields for
totalSplits
,queuedSplits
,runningSplits
, andcompletedSplits
in theTaskStats
,StageExecutionStats
, andQueryStats
classes. These additional fields are ultimately passed toQueryStateInfo
, which serves as the data structure used to send infromation for each query to the UI.UI Changes:
UI components displaying query execution stats will now show separate splits and drivers information separately. You can see in the screenshot below. I do need to ask the code owners about the new icons that need to be used to display split and driver stats, right now I am just reusing the same icons for both.
Java Worker:

Prestissimo Worker:

Future Work in UI:
Latest update in UI: