This is an automated email from the ASF dual-hosted git repository. yong pushed a commit to branch branch-4.17 in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
commit 6e6081c500dca2a4bdcd0ebf5f5a203d67df10cd Author: Masahiro Sakamoto <[email protected]> AuthorDate: Mon Jan 12 17:07:10 2026 +0900 Replace net.jpountz.lz4:lz4 with at.yawk.lz4:lz4-java (#4696) (cherry picked from commit b88fb5f0390a37947b33f1ba151de820f10452c5) --- bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt | 8 ++++---- bookkeeper-dist/src/main/resources/LICENSE-bkctl.bin.txt | 8 ++++---- bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt | 8 ++++---- pom.xml | 8 ++++---- shaded/distributedlog-core-shaded/pom.xml | 2 +- stream/distributedlog/common/pom.xml | 4 ++-- .../java/org/apache/distributedlog/io/LZ4CompressionCodec.java | 8 ++++---- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt b/bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt index a4c18fe3d8..61b2918b56 100644 --- a/bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt +++ b/bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt @@ -276,7 +276,7 @@ Apache Software License, Version 2. - lib/com.beust-jcommander-1.82.jar [24] - lib/com.yahoo.datasketches-memory-0.8.3.jar [25] - lib/com.yahoo.datasketches-sketches-core-0.8.3.jar [25] -- lib/net.jpountz.lz4-lz4-1.3.0.jar [26] +- lib/at.yawk.lz4-lz4-java-1.10.2.jar [26] - lib/com.google.api.grpc-proto-google-common-protos-2.51.0.jar [28] - lib/com.google.code.gson-gson-2.11.0.jar [29] - lib/io.opencensus-opencensus-api-0.31.1.jar [30] @@ -382,7 +382,7 @@ Apache Software License, Version 2. [23] Source available at https://github.com/facebook/rocksdb/tree/v7.10.2 [24] Source available at https://github.com/cbeust/jcommander/tree/1.82 [25] Source available at https://github.com/DataSketches/sketches-core/tree/sketches-0.8.3 -[26] Source available at https://github.com/lz4/lz4-java/tree/1.3.0 +[26] Source available at https://github.com/yawkat/lz4-java/tree/v1.10.2 [28] Source available at https://github.com/googleapis/java-common-protos/tree/v2.51.0 [29] Source available at https://github.com/google/gson/tree/gson-parent-2.11.0 [30] Source available at https://github.com/census-instrumentation/opencensus-java/tree/v0.31.1 @@ -502,13 +502,13 @@ decoding data in LZF format, written by Tatu Saloranta. It can be obtained at: * HOMEPAGE: * https://github.com/ning/compress -lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lz4', a LZ4 Java compression +lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lz4-java', a LZ4 Java compression and decompression library written by Adrien Grand. It can be obtained at: * LICENSE: * deps/netty/LICENSE.lz4.txt (Apache License 2.0) * HOMEPAGE: - * https://github.com/jpountz/lz4-java + * https://github.com/yawkat/lz4-java lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lzma-java', a LZMA Java compression and decompression library, which can be obtained at: diff --git a/bookkeeper-dist/src/main/resources/LICENSE-bkctl.bin.txt b/bookkeeper-dist/src/main/resources/LICENSE-bkctl.bin.txt index 962268f745..5c295e860d 100644 --- a/bookkeeper-dist/src/main/resources/LICENSE-bkctl.bin.txt +++ b/bookkeeper-dist/src/main/resources/LICENSE-bkctl.bin.txt @@ -247,7 +247,7 @@ Apache Software License, Version 2. - lib/org.apache.zookeeper-zookeeper-jute-3.9.3.jar [20] - lib/org.apache.zookeeper-zookeeper-3.9.3-tests.jar [20] - lib/com.beust-jcommander-1.82.jar [23] -- lib/net.jpountz.lz4-lz4-1.3.0.jar [25] +- lib/at.yawk.lz4-lz4-java-1.10.2.jar [25] - lib/com.google.api.grpc-proto-google-common-protos-2.51.0.jar [27] - lib/com.google.code.gson-gson-2.11.0.jar [28] - lib/io.opencensus-opencensus-api-0.31.1.jar [29] @@ -324,7 +324,7 @@ Apache Software License, Version 2. [19] Source available at https://github.com/apache/commons-lang/tree/LANG_3_6 [20] Source available at https://github.com/apache/zookeeper/tree/release-3.8.0 [23] Source available at https://github.com/cbeust/jcommander/tree/1.82 -[25] Source available at https://github.com/lz4/lz4-java/tree/1.3.0 +[25] Source available at https://github.com/yawkat/lz4-java/tree/v1.10.2 [27] Source available at https://github.com/googleapis/java-common-protos/tree/v2.51.0 [28] Source available at https://github.com/google/gson/tree/gson-parent-2.11.0 [29] Source available at https://github.com/census-instrumentation/opencensus-java/tree/v0.31.1 @@ -439,13 +439,13 @@ decoding data in LZF format, written by Tatu Saloranta. It can be obtained at: * HOMEPAGE: * https://github.com/ning/compress -lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lz4', a LZ4 Java compression +lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lz4-java', a LZ4 Java compression and decompression library written by Adrien Grand. It can be obtained at: * LICENSE: * deps/netty/LICENSE.lz4.txt (Apache License 2.0) * HOMEPAGE: - * https://github.com/jpountz/lz4-java + * https://github.com/yawkat/lz4-java lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lzma-java', a LZMA Java compression and decompression library, which can be obtained at: diff --git a/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt b/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt index 32f518ac32..116bc5bc7d 100644 --- a/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt +++ b/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt @@ -276,7 +276,7 @@ Apache Software License, Version 2. - lib/com.beust-jcommander-1.82.jar [24] - lib/com.yahoo.datasketches-memory-0.8.3.jar [25] - lib/com.yahoo.datasketches-sketches-core-0.8.3.jar [25] -- lib/net.jpountz.lz4-lz4-1.3.0.jar [26] +- lib/at.yawk.lz4-lz4-java-1.10.2.jar [26] - lib/com.google.api.grpc-proto-google-common-protos-2.51.0.jar [28] - lib/com.google.code.gson-gson-2.11.0.jar [29] - lib/io.opencensus-opencensus-api-0.31.1.jar [30] @@ -378,7 +378,7 @@ Apache Software License, Version 2. [23] Source available at https://github.com/facebook/rocksdb/tree/v7.10.2 [24] Source available at https://github.com/cbeust/jcommander/tree/1.82 [25] Source available at https://github.com/DataSketches/sketches-core/tree/sketches-0.8.3 -[26] Source available at https://github.com/lz4/lz4-java/tree/1.3.0 +[26] Source available at https://github.com/yawkat/lz4-java/tree/v1.10.2 [28] Source available at https://github.com/googleapis/java-common-protos/tree/v2.51.0 [29] Source available at https://github.com/google/gson/tree/gson-parent-2.11.0 [30] Source available at https://github.com/census-instrumentation/opencensus-java/tree/v0.31.1 @@ -497,13 +497,13 @@ decoding data in LZF format, written by Tatu Saloranta. It can be obtained at: * HOMEPAGE: * https://github.com/ning/compress -lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lz4', a LZ4 Java compression +lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lz4-java', a LZ4 Java compression and decompression library written by Adrien Grand. It can be obtained at: * LICENSE: * deps/netty/LICENSE.lz4.txt (Apache License 2.0) * HOMEPAGE: - * https://github.com/jpountz/lz4-java + * https://github.com/yawkat/lz4-java lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lzma-java', a LZMA Java compression and decompression library, which can be obtained at: diff --git a/pom.xml b/pom.xml index b079e79b1a..a8e1701419 100644 --- a/pom.xml +++ b/pom.xml @@ -154,7 +154,7 @@ <libthrift.version>0.14.2</libthrift.version> <lombok.version>1.18.30</lombok.version> <log4j.version>2.18.0</log4j.version> - <lz4.version>1.3.0</lz4.version> + <lz4-java.version>1.10.2</lz4-java.version> <mockito.version>4.11.0</mockito.version> <netty.version>4.1.121.Final</netty.version> <netty-iouring.version>0.0.26.Final</netty-iouring.version> @@ -337,9 +337,9 @@ <!-- compression libs --> <dependency> - <groupId>net.jpountz.lz4</groupId> - <artifactId>lz4</artifactId> - <version>${lz4.version}</version> + <groupId>at.yawk.lz4</groupId> + <artifactId>lz4-java</artifactId> + <version>${lz4-java.version}</version> </dependency> <!-- yaml dependencies --> diff --git a/shaded/distributedlog-core-shaded/pom.xml b/shaded/distributedlog-core-shaded/pom.xml index 899279fd1b..1501a877a3 100644 --- a/shaded/distributedlog-core-shaded/pom.xml +++ b/shaded/distributedlog-core-shaded/pom.xml @@ -74,7 +74,7 @@ <include>com.google.guava:failureaccess</include> <include>com.google.guava:guava</include> <include>com.google.protobuf:protobuf-java</include> - <include>net.jpountz.lz4:lz4</include> + <include>at.yawk.lz4:lz4-java</include> <include>org.apache.bookkeeper:bookkeeper-common</include> <include>org.apache.bookkeeper:bookkeeper-common-allocator</include> <include>org.apache.bookkeeper:cpu-affinity</include> diff --git a/stream/distributedlog/common/pom.xml b/stream/distributedlog/common/pom.xml index b5b312ea57..fcfdff6328 100644 --- a/stream/distributedlog/common/pom.xml +++ b/stream/distributedlog/common/pom.xml @@ -70,8 +70,8 @@ <artifactId>netty-buffer</artifactId> </dependency> <dependency> - <groupId>net.jpountz.lz4</groupId> - <artifactId>lz4</artifactId> + <groupId>at.yawk.lz4</groupId> + <artifactId>lz4-java</artifactId> </dependency> <dependency> <groupId>org.jmock</groupId> diff --git a/stream/distributedlog/common/src/main/java/org/apache/distributedlog/io/LZ4CompressionCodec.java b/stream/distributedlog/common/src/main/java/org/apache/distributedlog/io/LZ4CompressionCodec.java index 48439d23a1..a02322f4cc 100644 --- a/stream/distributedlog/common/src/main/java/org/apache/distributedlog/io/LZ4CompressionCodec.java +++ b/stream/distributedlog/common/src/main/java/org/apache/distributedlog/io/LZ4CompressionCodec.java @@ -25,7 +25,7 @@ import io.netty.buffer.PooledByteBufAllocator; import java.nio.ByteBuffer; import net.jpountz.lz4.LZ4Compressor; import net.jpountz.lz4.LZ4Factory; -import net.jpountz.lz4.LZ4FastDecompressor; +import net.jpountz.lz4.LZ4SafeDecompressor; /** * An {@code lz4} based {@link CompressionCodec} implementation. @@ -44,7 +44,7 @@ public class LZ4CompressionCodec implements CompressionCodec { // Used for compression private static final LZ4Compressor compressor = factory.fastCompressor(); // Used to decompress when the size of the output is known - private static final LZ4FastDecompressor decompressor = factory.fastDecompressor(); + private static final LZ4SafeDecompressor decompressor = factory.safeDecompressor(); @Override public ByteBuf compress(ByteBuf uncompressed, int headerLen) { @@ -69,7 +69,7 @@ public class LZ4CompressionCodec implements CompressionCodec { } @Override - // length parameter is ignored here because of the way the fastDecompressor works. + // length parameter is ignored here because of the way the safeDecompressor works. public ByteBuf decompress(ByteBuf compressed, int decompressedSize) { checkNotNull(compressed); checkArgument(compressed.readableBytes() >= 0); @@ -80,7 +80,7 @@ public class LZ4CompressionCodec implements CompressionCodec { ByteBuffer compressedNio = compressed.nioBuffer(compressed.readerIndex(), compressed.readableBytes()); decompressor.decompress( - compressedNio, compressedNio.position(), + compressedNio, compressedNio.position(), compressedNio.remaining(), uncompressedNio, uncompressedNio.position(), uncompressedNio.remaining()); uncompressed.writerIndex(decompressedSize); return uncompressed;
