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:
Ismael Juma 2021-02-13 07:28:17 -08:00 committed by GitHub
parent 1d4f69be34
commit 70a36bdacb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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));
}

View File

@ -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",