mirror of https://github.com/apache/kafka.git
MINOR: Update zstd and use classes with no finalizers (#10120)
The updated version includes a few optimizations that benefit us: * Classes with no finalizers (opt-in) that have better GC behavior * `InputStream.skip()` implementation that uses cached buffers * Minor buffer recycler optimizations (used for OutputStream only) Full diff: https://github.com/luben/zstd-jni/compare/v1.4.8-2...v1.4.8-4 Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
1d4f69be34
commit
70a36bdacb
|
@ -226,9 +226,9 @@ public enum CompressionType {
|
|||
|
||||
private static class ZstdConstructors {
|
||||
// It's ok to reference `BufferPool` since it doesn't load any native libraries
|
||||
static final MethodHandle INPUT = findConstructor("com.github.luben.zstd.ZstdInputStream",
|
||||
static final MethodHandle INPUT = findConstructor("com.github.luben.zstd.ZstdInputStreamNoFinalizer",
|
||||
MethodType.methodType(void.class, InputStream.class, BufferPool.class));
|
||||
static final MethodHandle OUTPUT = findConstructor("com.github.luben.zstd.ZstdOutputStream",
|
||||
static final MethodHandle OUTPUT = findConstructor("com.github.luben.zstd.ZstdOutputStreamNoFinalizer",
|
||||
MethodType.methodType(void.class, OutputStream.class, BufferPool.class));
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ versions += [
|
|||
testRetryPlugin: "1.2.0",
|
||||
zinc: "1.3.5",
|
||||
zookeeper: "3.5.9",
|
||||
zstd: "1.4.8-2"
|
||||
zstd: "1.4.8-4"
|
||||
]
|
||||
libs += [
|
||||
activation: "javax.activation:activation:$versions.activation",
|
||||
|
|
Loading…
Reference in New Issue