forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support yield in bucket sort table write getout to prevent stuck driv…
…er detection (facebookincubator#11229) Summary: Pull Request resolved: facebookincubator#11229 Support yield in the middle of sort writer get output processing to prevent stuck driver detection as well as friendly to other concurrent running queries or threads. We found in production that the long running get output from sort writer can trigger alerts as it does sort, potential read spilled data from remote storage and, encode and flush to remote storage through file writer. This can take hour in case of a small bucket table which only has 64 buckets such as only 64 threads in the whole cluster for running the query. This PR adds finish API to data sink and file writer for table writer to do incremental sort and flush processing. The data sink finish API call each file writer's finish API and both check the configured finish time slice limit which are configured through a hive config. Both API returns false if finish needs continue processing or true when finishes. Correspondingly, when table writer get output it returns null if finish data sink has more work to do and set the ready block future and yield reason for driver framework to check and yield. This PR also changes data sink and file writer interface with a new finish state. A new hive config added for finish time slice limit. The driver framework adds to report the yield from a operator which currently only reports the yield metric when the yield is triggered by the driver framework itself. A new histogram metric is added to track the sort writer finish time distribution to monitoring bypass-github-export-checks Reviewed By: Yuhta, spershin, oerling Differential Revision: D64159781 fbshipit-source-id: c13ca478a4e3c444b44e6f059cd82b76131299a2
- Loading branch information
1 parent
6cc4152
commit b00751e
Showing
22 changed files
with
507 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.