-
Notifications
You must be signed in to change notification settings - Fork 20
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
Issue 343: Reduce metadata memory footprint #335
Merged
Merged
Conversation
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
As we begin to handle a significant amount of metadata and transfer everything to the driver, we start encountering issues. One such problem stems from an outdated design approach where we aimed to keep the core of Qbeast independent from Spark. However, this approach now seems less sensible. If we aim to support different query engines in the future, it would be more efficient to rewrite the core classes in the respective languages of those engines. So what I've done is: 1. Move all classes from the core package to the spark one (only one package) 2. Change some API, so we return Dataset instead of IISeq 3. Change the code to rely as much as possible to Spark to do the computation
cugni
commented
Jul 9, 2024
cugni
commented
Jul 9, 2024
Jiaweihu08
reviewed
Jul 12, 2024
Jiaweihu08
reviewed
Jul 12, 2024
Jiaweihu08
reviewed
Jul 12, 2024
Jiaweihu08
reviewed
Jul 12, 2024
Jiaweihu08
reviewed
Jul 12, 2024
…eStatus there (the data is not indexed).
Jiaweihu08
reviewed
Jul 12, 2024
Jiaweihu08
reviewed
Jul 12, 2024
Jiaweihu08
reviewed
Jul 12, 2024
osopardo1
changed the title
Issue 33: Move query filtering to Dataset API
Issue 343: Move query filtering to Dataset API
Jul 12, 2024
osopardo1
changed the title
Issue 343: Move query filtering to Dataset API
Issue 343: Move index building to Dataset API
Jul 12, 2024
osopardo1
approved these changes
Jul 12, 2024
Jiaweihu08
changed the title
Issue 343: Move index building to Dataset API
Issue 343: Parallelize metadata processing and reduce metadata memory footprint
Jul 12, 2024
Jiaweihu08
changed the title
Issue 343: Parallelize metadata processing and reduce metadata memory footprint
Issue 343: Reduce metadata memory footprint
Jul 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR aims to improve metadata processing during index building by using the Dataset API from Spark SQL. As metadata size increases, especially the number of blocks, all OTree index operations become increasingly expensive.
The changes introduced here try to avoid materializing metadata when not needed.
Notable changes:
io.qbeast.core
intoio.qbeast.spark.core
blocks
fromCubeStatus
to reduce object sizefile
fromBlock
to avoid recursive referenceloadIndexFiles
returnDataSet[IndexFile]
.toLocalIterator
fromIndexStatusBuilder.indexCubeStatuses
withcollect
Checklist:
Here is the list of things you should do before submitting this pull request:
How Has This Been Tested? (Optional)
I run this query on this dataset :
With a single node, I've tested: