pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] sijie closed pull request #3134: Force to load LZ4 JNI wrapper
Date Thu, 06 Dec 2018 21:59:13 GMT
sijie closed pull request #3134: Force to load LZ4 JNI wrapper
URL: https://github.com/apache/pulsar/pull/3134

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/pulsar-common/src/main/java/org/apache/pulsar/common/compression/CompressionCodecLZ4.java
index 6eb0185165..01b600de79 100644
--- a/pulsar-common/src/main/java/org/apache/pulsar/common/compression/CompressionCodecLZ4.java
+++ b/pulsar-common/src/main/java/org/apache/pulsar/common/compression/CompressionCodecLZ4.java
@@ -32,6 +32,11 @@
 public class CompressionCodecLZ4 implements CompressionCodec {
+    static {
+        // Force the attempt to load LZ4 JNI
+        net.jpountz.util.Native.load();
+    }
     private static final LZ4Factory lz4Factory = LZ4Factory.fastestInstance();
     private static final LZ4Compressor compressor = lz4Factory.fastCompressor();
     private static final LZ4FastDecompressor decompressor = lz4Factory.fastDecompressor();


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

View raw message