Skip to content

Commit b88fb5f

Browse files
authored
Replace net.jpountz.lz4:lz4 with at.yawk.lz4:lz4-java (#4696)
1 parent 341f7d7 commit b88fb5f

File tree

7 files changed

+23
-23
lines changed

7 files changed

+23
-23
lines changed

bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ Apache Software License, Version 2.
276276
- lib/com.beust-jcommander-1.82.jar [24]
277277
- lib/com.yahoo.datasketches-memory-0.8.3.jar [25]
278278
- lib/com.yahoo.datasketches-sketches-core-0.8.3.jar [25]
279-
- lib/net.jpountz.lz4-lz4-1.3.0.jar [26]
279+
- lib/at.yawk.lz4-lz4-java-1.10.2.jar [26]
280280
- lib/com.google.api.grpc-proto-google-common-protos-2.51.0.jar [28]
281281
- lib/com.google.code.gson-gson-2.11.0.jar [29]
282282
- lib/io.opencensus-opencensus-api-0.31.1.jar [30]
@@ -383,7 +383,7 @@ Apache Software License, Version 2.
383383
[23] Source available at https://github.com/facebook/rocksdb/tree/v9.9.3
384384
[24] Source available at https://github.com/cbeust/jcommander/tree/1.82
385385
[25] Source available at https://github.com/DataSketches/sketches-core/tree/sketches-0.8.3
386-
[26] Source available at https://github.com/lz4/lz4-java/tree/1.3.0
386+
[26] Source available at https://github.com/yawkat/lz4-java/tree/v1.10.2
387387
[28] Source available at https://github.com/googleapis/java-common-protos/tree/v2.51.0
388388
[29] Source available at https://github.com/google/gson/tree/gson-parent-2.11.0
389389
[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:
503503
* HOMEPAGE:
504504
* https://github.com/ning/compress
505505

506-
lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lz4', a LZ4 Java compression
506+
lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lz4-java', a LZ4 Java compression
507507
and decompression library written by Adrien Grand. It can be obtained at:
508508

509509
* LICENSE:
510510
* deps/netty/LICENSE.lz4.txt (Apache License 2.0)
511511
* HOMEPAGE:
512-
* https://github.com/jpountz/lz4-java
512+
* https://github.com/yawkat/lz4-java
513513

514514
lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lzma-java', a LZMA Java compression
515515
and decompression library, which can be obtained at:

bookkeeper-dist/src/main/resources/LICENSE-bkctl.bin.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ Apache Software License, Version 2.
247247
- lib/org.apache.zookeeper-zookeeper-jute-3.9.3.jar [20]
248248
- lib/org.apache.zookeeper-zookeeper-3.9.3-tests.jar [20]
249249
- lib/com.beust-jcommander-1.82.jar [23]
250-
- lib/net.jpountz.lz4-lz4-1.3.0.jar [25]
250+
- lib/at.yawk.lz4-lz4-java-1.10.2.jar [25]
251251
- lib/com.google.api.grpc-proto-google-common-protos-2.51.0.jar [27]
252252
- lib/com.google.code.gson-gson-2.11.0.jar [28]
253253
- lib/io.opencensus-opencensus-api-0.31.1.jar [29]
@@ -325,7 +325,7 @@ Apache Software License, Version 2.
325325
[19] Source available at https://github.com/apache/commons-lang/tree/LANG_3_6
326326
[20] Source available at https://github.com/apache/zookeeper/tree/release-3.8.0
327327
[23] Source available at https://github.com/cbeust/jcommander/tree/1.82
328-
[25] Source available at https://github.com/lz4/lz4-java/tree/1.3.0
328+
[25] Source available at https://github.com/yawkat/lz4-java/tree/v1.10.2
329329
[27] Source available at https://github.com/googleapis/java-common-protos/tree/v2.51.0
330330
[28] Source available at https://github.com/google/gson/tree/gson-parent-2.11.0
331331
[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:
440440
* HOMEPAGE:
441441
* https://github.com/ning/compress
442442

443-
lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lz4', a LZ4 Java compression
443+
lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lz4-java', a LZ4 Java compression
444444
and decompression library written by Adrien Grand. It can be obtained at:
445445

446446
* LICENSE:
447447
* deps/netty/LICENSE.lz4.txt (Apache License 2.0)
448448
* HOMEPAGE:
449-
* https://github.com/jpountz/lz4-java
449+
* https://github.com/yawkat/lz4-java
450450

451451
lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lzma-java', a LZMA Java compression
452452
and decompression library, which can be obtained at:

bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ Apache Software License, Version 2.
276276
- lib/com.beust-jcommander-1.82.jar [24]
277277
- lib/com.yahoo.datasketches-memory-0.8.3.jar [25]
278278
- lib/com.yahoo.datasketches-sketches-core-0.8.3.jar [25]
279-
- lib/net.jpountz.lz4-lz4-1.3.0.jar [26]
279+
- lib/at.yawk.lz4-lz4-java-1.10.2.jar [26]
280280
- lib/com.google.api.grpc-proto-google-common-protos-2.51.0.jar [28]
281281
- lib/com.google.code.gson-gson-2.11.0.jar [29]
282282
- lib/io.opencensus-opencensus-api-0.31.1.jar [30]
@@ -379,7 +379,7 @@ Apache Software License, Version 2.
379379
[23] Source available at https://github.com/facebook/rocksdb/tree/v9.9.3
380380
[24] Source available at https://github.com/cbeust/jcommander/tree/1.82
381381
[25] Source available at https://github.com/DataSketches/sketches-core/tree/sketches-0.8.3
382-
[26] Source available at https://github.com/lz4/lz4-java/tree/1.3.0
382+
[26] Source available at https://github.com/yawkat/lz4-java/tree/v1.10.2
383383
[28] Source available at https://github.com/googleapis/java-common-protos/tree/v2.51.0
384384
[29] Source available at https://github.com/google/gson/tree/gson-parent-2.11.0
385385
[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:
498498
* HOMEPAGE:
499499
* https://github.com/ning/compress
500500

501-
lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lz4', a LZ4 Java compression
501+
lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lz4-java', a LZ4 Java compression
502502
and decompression library written by Adrien Grand. It can be obtained at:
503503

504504
* LICENSE:
505505
* deps/netty/LICENSE.lz4.txt (Apache License 2.0)
506506
* HOMEPAGE:
507-
* https://github.com/jpountz/lz4-java
507+
* https://github.com/yawkat/lz4-java
508508

509509
lib/io.netty-netty-codec-4.1.121.Final.jar optionally depends on 'lzma-java', a LZMA Java compression
510510
and decompression library, which can be obtained at:

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
<libthrift.version>0.14.2</libthrift.version>
157157
<lombok.version>1.18.32</lombok.version>
158158
<log4j.version>2.23.1</log4j.version>
159-
<lz4.version>1.3.0</lz4.version>
159+
<lz4-java.version>1.10.2</lz4-java.version>
160160
<mockito.version>4.11.0</mockito.version>
161161
<netty.version>4.1.121.Final</netty.version>
162162
<netty-iouring.version>0.0.26.Final</netty-iouring.version>
@@ -343,9 +343,9 @@
343343

344344
<!-- compression libs -->
345345
<dependency>
346-
<groupId>net.jpountz.lz4</groupId>
347-
<artifactId>lz4</artifactId>
348-
<version>${lz4.version}</version>
346+
<groupId>at.yawk.lz4</groupId>
347+
<artifactId>lz4-java</artifactId>
348+
<version>${lz4-java.version}</version>
349349
</dependency>
350350

351351
<!-- yaml dependencies -->

shaded/distributedlog-core-shaded/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<include>com.google.guava:failureaccess</include>
7575
<include>com.google.guava:guava</include>
7676
<include>com.google.protobuf:protobuf-java</include>
77-
<include>net.jpountz.lz4:lz4</include>
77+
<include>at.yawk.lz4:lz4-java</include>
7878
<include>org.apache.bookkeeper:bookkeeper-common</include>
7979
<include>org.apache.bookkeeper:bookkeeper-common-allocator</include>
8080
<include>org.apache.bookkeeper:native-library-common</include>

stream/distributedlog/common/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
<artifactId>netty-buffer</artifactId>
7171
</dependency>
7272
<dependency>
73-
<groupId>net.jpountz.lz4</groupId>
74-
<artifactId>lz4</artifactId>
73+
<groupId>at.yawk.lz4</groupId>
74+
<artifactId>lz4-java</artifactId>
7575
</dependency>
7676
<dependency>
7777
<groupId>org.jmock</groupId>

stream/distributedlog/common/src/main/java/org/apache/distributedlog/io/LZ4CompressionCodec.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import java.nio.ByteBuffer;
2626
import net.jpountz.lz4.LZ4Compressor;
2727
import net.jpountz.lz4.LZ4Factory;
28-
import net.jpountz.lz4.LZ4FastDecompressor;
28+
import net.jpountz.lz4.LZ4SafeDecompressor;
2929

3030
/**
3131
* An {@code lz4} based {@link CompressionCodec} implementation.
@@ -44,7 +44,7 @@ public static LZ4CompressionCodec of() {
4444
// Used for compression
4545
private static final LZ4Compressor compressor = factory.fastCompressor();
4646
// Used to decompress when the size of the output is known
47-
private static final LZ4FastDecompressor decompressor = factory.fastDecompressor();
47+
private static final LZ4SafeDecompressor decompressor = factory.safeDecompressor();
4848

4949
@Override
5050
public ByteBuf compress(ByteBuf uncompressed, int headerLen) {
@@ -69,7 +69,7 @@ public ByteBuf compress(ByteBuf uncompressed, int headerLen) {
6969
}
7070

7171
@Override
72-
// length parameter is ignored here because of the way the fastDecompressor works.
72+
// length parameter is ignored here because of the way the safeDecompressor works.
7373
public ByteBuf decompress(ByteBuf compressed, int decompressedSize) {
7474
checkNotNull(compressed);
7575
checkArgument(compressed.readableBytes() >= 0);
@@ -80,7 +80,7 @@ public ByteBuf decompress(ByteBuf compressed, int decompressedSize) {
8080
ByteBuffer compressedNio = compressed.nioBuffer(compressed.readerIndex(), compressed.readableBytes());
8181

8282
decompressor.decompress(
83-
compressedNio, compressedNio.position(),
83+
compressedNio, compressedNio.position(), compressedNio.remaining(),
8484
uncompressedNio, uncompressedNio.position(), uncompressedNio.remaining());
8585
uncompressed.writerIndex(decompressedSize);
8686
return uncompressed;

0 commit comments

Comments
 (0)