This is an automated email from the ASF dual-hosted git repository.

yong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new b88fb5f039 Replace net.jpountz.lz4:lz4 with at.yawk.lz4:lz4-java 
(#4696)
b88fb5f039 is described below

commit b88fb5f0390a37947b33f1ba151de820f10452c5
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)
---
 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 0a935a8b8d..5642ba692f 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]
@@ -383,7 +383,7 @@ Apache Software License, Version 2.
 [23] Source available at https://github.com/facebook/rocksdb/tree/v9.9.3
 [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
@@ -503,13 +503,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 83384ba91f..e9257d34c1 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]
@@ -325,7 +325,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
@@ -440,13 +440,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 a0b5436650..ff672fc57f 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]
@@ -379,7 +379,7 @@ Apache Software License, Version 2.
 [23] Source available at https://github.com/facebook/rocksdb/tree/v9.9.3
 [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
@@ -498,13 +498,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 3fab37aa97..eae02595f1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -156,7 +156,7 @@
     <libthrift.version>0.14.2</libthrift.version>
     <lombok.version>1.18.32</lombok.version>
     <log4j.version>2.23.1</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>
@@ -343,9 +343,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 37fa39f7d7..cd637147ad 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:native-library-common</include>
diff --git a/stream/distributedlog/common/pom.xml 
b/stream/distributedlog/common/pom.xml
index eb64a4e0bf..27a799109f 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;

Reply via email to