Skip to content
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

[Feature] Add the ability to compress and decompress tar archive file with ZStandard and LZ4 compressors #13782

Merged
merged 5 commits into from
Aug 14, 2024

Conversation

jackluo923
Copy link
Contributor

This pull request enhances tar archive compression and decompression by adding support for ZStandard and LZ4, alongside GZip. The code is refactored for easy extensibility, allowing new compressors to be added with minimal effort if supported by Apache Commons Compress.

Compression typically infers the compressor from the file extension, but it can also be specified by name. Decompression uses magic numbers to automatically identify the compressor, utilizing Apache Commons Compress functionality.

This update is a step towards enabling ZStandard compression for segment data in Deepstore. As noted in the flamegraph profiling in issue #13319, GZip compression is currently a CPU bottleneck, consuming 5-10% of overall CPU usage in petabyte-scale production environments.

Signed-off-by: Jack Luo <jluo14@ext.uber.com>
Signed-off-by: Jack Luo <jluo14@ext.uber.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2024

Codecov Report

Attention: Patch coverage is 55.00000% with 36 lines in your changes missing coverage. Please review.

Project coverage is 61.94%. Comparing base (59551e4) to head (bed74bc).
Report is 888 commits behind head on master.

Files Patch % Lines
...apache/pinot/common/utils/TarCompressionUtils.java 72.50% 9 Missing and 2 partials ⚠️
...he/pinot/segment/local/utils/SegmentPushUtils.java 0.00% 5 Missing ⚠️
.../tasks/BaseMultipleSegmentsConversionExecutor.java 0.00% 3 Missing ⚠️
...ion/tasks/BaseSingleSegmentConversionExecutor.java 0.00% 3 Missing ⚠️
...c/main/java/org/apache/pinot/compat/SegmentOp.java 0.00% 2 Missing ⚠️
...er/api/resources/LLCSegmentCompletionHandlers.java 0.00% 2 Missing ⚠️
...n/batch/spark/SparkSegmentGenerationJobRunner.java 33.33% 2 Missing ⚠️
.../batch/spark3/SparkSegmentGenerationJobRunner.java 33.33% 2 Missing ⚠️
...org/apache/pinot/common/utils/http/HttpClient.java 0.00% 1 Missing ⚠️
.../pinot/core/data/manager/BaseTableDataManager.java 66.66% 1 Missing ⚠️
... and 4 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13782      +/-   ##
============================================
+ Coverage     61.75%   61.94%   +0.19%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2558     +122     
  Lines        133233   141224    +7991     
  Branches      20636    21977    +1341     
============================================
+ Hits          82274    87480    +5206     
- Misses        44911    47078    +2167     
- Partials       6048     6666     +618     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 61.89% <55.00%> (+0.18%) ⬆️
java-21 61.82% <55.00%> (+0.19%) ⬆️
skip-bytebuffers-false 61.89% <55.00%> (+0.14%) ⬆️
skip-bytebuffers-true 61.81% <55.00%> (+34.08%) ⬆️
temurin 61.94% <55.00%> (+0.19%) ⬆️
unittests 61.93% <55.00%> (+0.19%) ⬆️
unittests1 46.37% <60.78%> (-0.52%) ⬇️
unittests2 27.81% <16.25%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly good

jackluo923 and others added 3 commits August 15, 2024 02:17
Signed-off-by: Jack Luo <jluo14@ext.uber.com>
Signed-off-by: Jack Luo <jluo14@ext.uber.com>
… class instance

Signed-off-by: Jack Luo <jluo14@ext.uber.com>
@Jackie-Jiang Jackie-Jiang merged commit df366cc into apache:master Aug 14, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants