ClickHouse / ClickHouse/clickhouse-java
Replace unmaintained lz4-java with Apache Commons Compress LZ4
- 主要语言
- Java
- 星标
- 1.6k
- 派生
- 636
- 平均合并
- 2 天 23 小时
- 30 天内合并 PR
- 29
描述
org.lz4:lz4-java (1.8.0) has been unmaintained for years and triggers JDK 17 + startup warnings:
> WARNING: A restricted method in java.lang.System has been called
> WARNING: java.lang.System::loadLibrary has been called by net.jpountz.util.Native in an unnamed module (file:/home/X/.gradle/caches/modules-2/files-2.1/org.lz4/lz4-java/1.8.0/4b986a99445e49ea5fbf5d149c4b63f6ed6c6780/lz4-java-1.8.0.jar)
> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
> WARNING: Restricted methods will be blocked in a future release unless native access is enabled
This native-loading path can also hurt performance.
Proposed fix
- Drop org.lz4:lz4-java.
- Add org.apache.commons:commons-compress (current release).
- Switch to its LZ4 APIs (org.apache.commons.compress.compressors.lz4.*).
Apache Commons Compress is actively maintained and JDK-compatible:
https://commons.apache.org/proper/commons-compress/apidocs/org/apache/commons/compress/compressors/lz4/package-summary.html
贡献指南
调研方向
定位当前依赖 org.lz4:lz4-java 并使用其 API 的构建配置和 Java 代码。阅读 Apache Commons Compress 对应的 LZ4 包文档,然后在切换依赖和 API 后运行现有的 Java 测试。完成的标准是旧依赖和 native 加载路径已移除,替代实现能够构建,并且测试通过。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- backend, build-system
- Issue 类型
- 重构
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100