This is an automated email from the ASF dual-hosted git repository.
vhs pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new bef0c54ac5b4 [HUDI-3055] Fix hardcoded GZIP compression codec in
HFileUtils (#18263)
bef0c54ac5b4 is described below
commit bef0c54ac5b4f1c88cca0bffcc8fb2be8ad33673
Author: ZZZxDong <[email protected]>
AuthorDate: Tue Mar 31 15:38:34 2026 +0800
[HUDI-3055] Fix hardcoded GZIP compression codec in HFileUtils (#18263)
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.
---
hudi-common/src/main/java/org/apache/hudi/common/util/HFileUtils.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/hudi-common/src/main/java/org/apache/hudi/common/util/HFileUtils.java
b/hudi-common/src/main/java/org/apache/hudi/common/util/HFileUtils.java
index 3331cf3866d3..e47779c6f623 100644
--- a/hudi-common/src/main/java/org/apache/hudi/common/util/HFileUtils.java
+++ b/hudi-common/src/main/java/org/apache/hudi/common/util/HFileUtils.java
@@ -76,7 +76,8 @@ public class HFileUtils extends FileFormatUtils {
public static CompressionCodec getHFileCompressionAlgorithm(Map<String,
String> paramsMap) {
String codecName = paramsMap.get(HFILE_COMPRESSION_ALGORITHM_NAME.key());
if (StringUtils.isNullOrEmpty(codecName)) {
- return CompressionCodec.GZIP;
+ // Use the default value from config instead of hardcoding GZIP
+ return
CompressionCodec.findCodecByName(HFILE_COMPRESSION_ALGORITHM_NAME.defaultValue());
}
return CompressionCodec.findCodecByName(codecName);
}