HADOOP-19874. ZStandardCodec supports multi-threaded compression#8461
Open
pan3793 wants to merge 5 commits intoapache:trunkfrom
Open
HADOOP-19874. ZStandardCodec supports multi-threaded compression#8461pan3793 wants to merge 5 commits intoapache:trunkfrom
pan3793 wants to merge 5 commits intoapache:trunkfrom
Conversation
pan3793
commented
Apr 27, 2026
| // job has finished and its output has been drained to the dst buffer. | ||
| // 3. END + workers ≥ 1: same as FLUSH but also closes the frame. Same | ||
| // blocking behavior. | ||
| EndDirective endOp = shouldEnd ? EndDirective.END : EndDirective.CONTINUE; |
Member
Author
There was a problem hiding this comment.
my spark integration test shows it has no effect when using FLUSH - setting workers to 4 has the same cpu usage and wall-clock time as the default workers 0. while after the change to CONTINUE, the cpu average usage takes ~3.5x, wall-clock time cost has also decreased significantly
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
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
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 of PR
A new config
io.compression.codec.zstd.workers(default 0, means disabled) is introduced for ZStandardCodec to support multi-threaded compression, the corresponding native Zstd parameter isZSTD_c_nbWorkershttps://facebook.github.io/zstd/zstd_manual.html
How was this patch tested?
Pass existing UTs and newly added UTs.
Integrated with Spark and tested writing JSON zstd with setting
io.compression.codec.zstd.workersto 0 and 4For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?AI Tooling
This patch contains content generated by Claude Opus 4.7.
If an AI tool was used:
where is the name of the AI tool used.
https://www.apache.org/legal/generative-tooling.html