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

feat: add compression mode for BlockAsFileWriter #387

Merged
merged 27 commits into from
Dec 16, 2024

Conversation

ata-nas
Copy link
Contributor

@ata-nas ata-nas commented Dec 9, 2024

Description:

  • add compression support for the block-as-file writer

Related issue(s):

Fixes #282

Notes for reviewer:

TBD

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

  • add a new compression component
  • add configuration for compression
  • ? (maybe next ticket part of the EPIC: Essential Block Storage and Retrieval Support #309 epic, reading support for compressions will require it, lets not block the follow up PRs) extend the path resolver to be able to "find" a block, now we have multiple file extensions, so all must be supported

@ata-nas ata-nas added this to the 0.3.0 milestone Dec 9, 2024
@ata-nas ata-nas self-assigned this Dec 9, 2024
@ata-nas ata-nas linked an issue Dec 9, 2024 that may be closed by this pull request
@ata-nas ata-nas added the Block Node Issues/PR related to the Block Node. label Dec 9, 2024
@ata-nas ata-nas marked this pull request as ready for review December 10, 2024 14:34
@ata-nas ata-nas requested a review from a team as a code owner December 10, 2024 14:34
Copy link
Contributor

@AlfredoG87 AlfredoG87 left a comment

Choose a reason for hiding this comment

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

I agree that the Compression class should receive a stream and return a stream. otherwise looks good.

@ata-nas ata-nas marked this pull request as draft December 11, 2024 15:06
@ata-nas ata-nas force-pushed the 282-feat-add-compression-mode-for-blockasfilewriter branch from e61a459 to e85fe16 Compare December 12, 2024 12:09
@ata-nas ata-nas marked this pull request as ready for review December 12, 2024 13:41
AlfredoG87
AlfredoG87 previously approved these changes Dec 13, 2024
Copy link
Contributor

@AlfredoG87 AlfredoG87 left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Atanas Atanasov <[email protected]>
Signed-off-by: Atanas Atanasov <[email protected]>
Signed-off-by: Atanas Atanasov <[email protected]>
Signed-off-by: Atanas Atanasov <[email protected]>
@ata-nas ata-nas force-pushed the 282-feat-add-compression-mode-for-blockasfilewriter branch from 4be98f4 to 3a44365 Compare December 16, 2024 10:47
Signed-off-by: Atanas Atanasov <[email protected]>
Copy link
Contributor

@mattp-swirldslabs mattp-swirldslabs left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

Signed-off-by: Atanas Atanasov <[email protected]>
@ata-nas ata-nas merged commit 72d8e84 into main Dec 16, 2024
10 checks passed
@ata-nas ata-nas deleted the 282-feat-add-compression-mode-for-blockasfilewriter branch December 16, 2024 21:27
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.06%. Comparing base (4201258) to head (b8709c8).
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #387      +/-   ##
============================================
+ Coverage     96.99%   97.06%   +0.07%     
- Complexity      400      416      +16     
============================================
  Files            80       82       +2     
  Lines          1429     1465      +36     
  Branches         94       96       +2     
============================================
+ Hits           1386     1422      +36     
  Misses           32       32              
  Partials         11       11              
Files with missing lines Coverage Δ
...a/com/hedera/block/common/utils/FileUtilities.java 100.00% <100.00%> (ø)
...a/com/hedera/block/common/utils/Preconditions.java 100.00% <100.00%> (ø)
...er/config/ServerMappedConfigSourceInitializer.java 100.00% <ø> (ø)
...server/persistence/PersistenceInjectionModule.java 100.00% <100.00%> (ø)
.../persistence/storage/PersistenceStorageConfig.java 100.00% <100.00%> (ø)
...rsistence/storage/compression/NoOpCompression.java 100.00% <100.00%> (ø)
...rsistence/storage/compression/ZstdCompression.java 100.00% <100.00%> (ø)
...sistence/storage/write/BlockAsLocalFileWriter.java 100.00% <100.00%> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Block Node Issues/PR related to the Block Node.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: add compression mode for BlockAsFileWriter
4 participants