fix: [HUDI-3055] Fix hardcoded GZIP compression codec in HFileUtils#18263
Merged
voonhous merged 1 commit intoapache:masterfrom Mar 31, 2026
Merged
Conversation
Use configuration default value instead of hardcoding CompressionCodec.GZIP in getHFileCompressionAlgorithm method to respect user's compression config. Existing tests in TestHFileUtils already cover this change.
Collaborator
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18263 +/- ##
==========================================
Coverage 57.30% 57.30%
- Complexity 18580 18596 +16
==========================================
Files 1947 1948 +1
Lines 106396 106497 +101
Branches 13153 13160 +7
==========================================
+ Hits 60967 61025 +58
- Misses 39680 39719 +39
- Partials 5749 5753 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
danny0405
approved these changes
Mar 20, 2026
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.
Describe the issue this Pull Request addresses
Fix issue #14963: Ensure that compression codec configuration is respected across the board.
Changes here only affect routes when codec is null or empty, hence default value should be respected.
Summary and Changelog
HFileUtils.getHFileCompressionAlgorithm()to useHFILE_COMPRESSION_ALGORITHM_NAME.defaultValue()instead of hardcodingCompressionCodec.GZIPVerify this pull request
This pull request is already covered by existing tests:
TestHFileUtils.testGetHFileCompressionAlgorithm()- tests all compression codecsTestHFileUtils.testGetHFileCompressionAlgorithmWithEmptyString()- tests empty string caseTestHFileUtils.testGetDefaultHFileCompressionAlgorithm()- tests default value caseImpact
Ensure that compression codec configuration is respected across the board, Hfile uses hfile default compression for now.
Risk Level
None
Documentation Update
None
Contributor's checklist