-
Notifications
You must be signed in to change notification settings - Fork 3.8k
MSQ: Use VSF, give stages control over inputs. #18873
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
Open
gianm
wants to merge
9
commits into
apache:master
Choose a base branch
from
gianm:msq-read-input-channels-1x1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+2,723
−2,564
Conversation
This file contains hidden or 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
The purpose of this config is to enable using SegmentLocalCacheManager for loading segments on MSQ worker tasks, where segments are not assigned by load/drop rules, and where there is not generally a specific maxSize configured for the local cache. We need to evict segments immediately so local disks don't fill up. The main changes: 1) In StorageLocation, update the releaseHold runnable to check for evictImmediately. If it is set, unmount the cache entry if all holds have been released. 2) In SegmentLocalCacheManager, when evictImmediately is set, "mount" sets an onUnmount handler to delete the info file.
This patch integrates MSQ with virtual storage. It also refactors how MSQ reads inputs to give stages more control over how inputs are read and merged. In particular, stages are now able to fully control merging logic. The main changes: 1) Integrate with virtual storage: merge the two DataSegmentProvider impls (Dart and Task) into DataSegmentProviderImpl that relies on SegmentManager. 2) Give stages control over input merging: rework InputSliceReader to return ReadablePartitions directly, without embedding any merging logic. Break out StandardPartitionReader as a separate class. Other changes: 1) Move ReadableInput to the querykit package. It is no longer specific to the MSQ framework. 2) Remove StandardStageProcessor, refactoring dependent code to not require it. 3) Remove ExternalColumnSelectorFactory wrapper. Type casting is now handled directly by RowBasedColumnSelectorFactory. 4) Include full query context in worker context, rather than just a subset. Includes apache#18871.
multi-stage-query/src/main/java/org/apache/druid/msq/shuffle/output/StageOutputHolder.java
Fixed
Show fixed
Hide fixed
| for (AcquireSegmentAction acquireSegmentAction : loadingSegments) { | ||
| CloseableUtils.closeAndSuppressExceptions( | ||
| acquireSegmentAction, | ||
| e -> log.warn(e, "Failed to close loadingSegment[%s]", acquireSegmentAction) |
Check notice
Code scanning / CodeQL
Use of default toString() Note
Default toString(): AcquireSegmentAction inherits toString() from Object, and so is not suitable for printing.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area - Batch Ingestion
Area - Ingestion
Area - MSQ
For multi stage queries - https://github.com/apache/druid/issues/12262
Area - Segment Format and Ser/De
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch integrates MSQ with virtual storage. It also refactors how MSQ reads inputs to give stages more control over how inputs are read and merged. In particular, stages are now able to fully control merging logic.
The main changes:
Integrate with virtual storage: merge the two DataSegmentProvider impls (Dart and Task) into DataSegmentProviderImpl that relies on SegmentManager.
Give stages control over input merging: rework InputSliceReader to return ReadablePartitions directly, without embedding any merging logic. Break out StandardPartitionReader as a separate class.
Other changes:
Move ReadableInput to the querykit package. It is no longer specific to the MSQ framework.
Remove StandardStageProcessor, refactoring dependent code to not require it.
Remove ExternalColumnSelectorFactory wrapper. Type casting is now handled directly by RowBasedColumnSelectorFactory.
Include full query context in worker context, rather than just a subset.
Includes #18871 and #18878.