-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Add sequential sketch merging to MSQ #13205
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
Merged
cryptoe
merged 34 commits into
apache:master
from
adarshsanjeev:sequential-sketch-merging
Nov 22, 2022
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
681f8fb
Add sketch fetching framework
adarshsanjeev b375d59
Refactor code to support sequential merge
adarshsanjeev 113a3d9
Update worker sketch fetcher
adarshsanjeev 9fce02a
Refactor sketch fetcher
adarshsanjeev 1657ee0
Refactor sketch fetcher
adarshsanjeev 313e9a8
Add context parameter and threshold to trigger sequential merge
adarshsanjeev 0be3d4f
Fix test
adarshsanjeev a312f20
Add integration test for non sequential merge
adarshsanjeev 8037413
Merge remote-tracking branch 'origin/master' into sequential-sketch-m…
adarshsanjeev c74da2c
Address review comments
adarshsanjeev 5ec8e39
Address review comments
adarshsanjeev 0264bb0
Address review comments
adarshsanjeev 6395b7c
Merge remote-tracking branch 'origin/master' into sequential-sketch-m…
adarshsanjeev 4656f47
Resolve maxRetainedBytes
adarshsanjeev 07876f5
Add new classes
adarshsanjeev bb86c19
Renamed key statistics information class
adarshsanjeev 35d8e71
Rename fetchStatisticsSnapshotForTimeChunk function
adarshsanjeev 3a2078f
Address review comments
adarshsanjeev bcaeae9
Address review comments
adarshsanjeev 18c60bc
Update documentation and add comments
adarshsanjeev 2f91002
Resolve build issues
adarshsanjeev 3852cd1
Resolve build issues
adarshsanjeev 682aa71
Change worker APIs to async
adarshsanjeev 85ad968
Address review comments
adarshsanjeev 090ce07
Resolve build issues
adarshsanjeev aa58285
Add null time check
adarshsanjeev 522c090
Update integration tests
adarshsanjeev 953ff05
Address review comments
adarshsanjeev 3efa5b6
Add log messages and comments
adarshsanjeev 7514cee
Resolve build issues
adarshsanjeev 08d5f9c
Add unit tests
adarshsanjeev 4c7e2db
Add unit tests
adarshsanjeev 894d0d4
Merge remote-tracking branch 'origin/master' into sequential-sketch-m…
adarshsanjeev 837ed3d
Fix timing issue in tests
adarshsanjeev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
44 changes: 44 additions & 0 deletions
44
...multi-stage-query/src/main/java/org/apache/druid/msq/exec/ClusterStatisticsMergeMode.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| package org.apache.druid.msq.exec; | ||
|
|
||
| /** | ||
| * Mode which dictates how {@link WorkerSketchFetcher} gets sketches for the partition boundaries from workers. | ||
| */ | ||
| public enum ClusterStatisticsMergeMode | ||
| { | ||
| /** | ||
| * Fetches sketch in sequential order based on time. Slower due to overhead, but more accurate. | ||
| */ | ||
| SEQUENTIAL, | ||
|
|
||
| /** | ||
| * Fetch all sketches from the worker at once. Faster to generate partitions, but less accurate. | ||
| */ | ||
| PARALLEL, | ||
|
|
||
| /** | ||
| * Tries to decide between sequential and parallel modes based on the number of workers and size of the input | ||
| * | ||
| * If there are more than 100 workers or if the combined sketch size among all workers is more than | ||
| * 1,000,000,000 bytes, SEQUENTIAL mode is chosen, otherwise, PARALLEL mode is chosen. | ||
| */ | ||
| AUTO | ||
| } | ||
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.