-
Notifications
You must be signed in to change notification settings - Fork 447
[CELEBORN-2350] Support chunk level compression to optimize storage #3699
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
saurabhd336
wants to merge
29
commits into
apache:main
Choose a base branch
from
saurabhd336:chunkCompressedWriter
base: main
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
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
6e53791
Support chunk compressed data writer
saurabhd336 53a4e81
Add read support
saurabhd336 5520acc
Add tests
saurabhd336 f917a57
lint fix
saurabhd336 cde5467
Add e2e test
saurabhd336 4f76be5
Fix lint
saurabhd336 c3ed330
Fix sbt build
saurabhd336 485dd23
Fix compression level compilation
saurabhd336 3d1daa4
Fix client.md
saurabhd336 c3d4bc8
Fix test
saurabhd336 7c2cbff
Fix test
saurabhd336 78611fd
Fix chunk compressed writer
saurabhd336 187906a
Avoid chunk compression during large records
saurabhd336 3533e52
Move to chunk compression context message
saurabhd336 174db3d
Fix compression
saurabhd336 91a49e7
Don't compress large records
saurabhd336 032f7aa
Fix ChunkCompressedFileChannelWriterSuiteJ to handle uncompressed lar…
saurabhd336 39595da
Lint fix
saurabhd336 6d8a640
Fix compilation
saurabhd336 3b1ea63
Fix test
saurabhd336 c9b4785
Fix lint
saurabhd336 18f3ac7
Address comments
saurabhd336 e6e45ac
Address comments
saurabhd336 709b05d
Address comments
saurabhd336 563b5b9
Lint fix
saurabhd336 0ddb927
Address comments
saurabhd336 6f03c94
Address comments
saurabhd336 7b503bc
address comments
saurabhd336 c96df79
Address
saurabhd336 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
Some comments aren't visible on the classic Files Changed page.
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
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
53 changes: 53 additions & 0 deletions
53
common/src/main/java/org/apache/celeborn/common/compression/ChunkCompressionContext.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,53 @@ | ||
| /* | ||
| * 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.celeborn.common.compression; | ||
|
|
||
| /** | ||
| * Carries chunk-level compression settings from the client through to the worker's {@code | ||
| * ChunkCompressedFileChannelWriter}. Using a context object instead of a bare boolean keeps the | ||
| * call chain stable as new compression knobs are added. | ||
| */ | ||
| public final class ChunkCompressionContext { | ||
|
|
||
| /** ZSTD default compression level (mirrors {@code Zstd.defaultCompressionLevel()}). */ | ||
| public static final int DEFAULT_COMPRESSION_LEVEL = 3; | ||
|
|
||
| private static final ChunkCompressionContext DISABLED = | ||
| new ChunkCompressionContext(false, DEFAULT_COMPRESSION_LEVEL); | ||
|
|
||
| private final boolean enabled; | ||
| private final int compressionLevel; | ||
|
|
||
| public ChunkCompressionContext(boolean enabled, int compressionLevel) { | ||
| this.enabled = enabled; | ||
| this.compressionLevel = compressionLevel; | ||
| } | ||
|
|
||
| /** Returns a context with compression disabled and the default compression level. */ | ||
| public static ChunkCompressionContext disabled() { | ||
| return DISABLED; | ||
| } | ||
|
|
||
| public boolean isEnabled() { | ||
| return enabled; | ||
| } | ||
|
|
||
| public int getCompressionLevel() { | ||
| return compressionLevel; | ||
| } | ||
| } |
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.
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.