From 49ea9363a6a60f6b3c4f6a8a1a5363ede7ebca29 Mon Sep 17 00:00:00 2001 From: Chong Gao Date: Mon, 16 Dec 2024 23:14:28 +0800 Subject: [PATCH] Fix `UnsatisfiedLinkError` in some rare cases (#2700) Signed-off-by: Chong Gao Co-authored-by: Chong Gao --- src/main/java/com/nvidia/spark/rapids/jni/Hash.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/nvidia/spark/rapids/jni/Hash.java b/src/main/java/com/nvidia/spark/rapids/jni/Hash.java index 96b66555a..2d23ae525 100644 --- a/src/main/java/com/nvidia/spark/rapids/jni/Hash.java +++ b/src/main/java/com/nvidia/spark/rapids/jni/Hash.java @@ -22,15 +22,15 @@ import ai.rapids.cudf.NativeDepsLoader; public class Hash { + static { + NativeDepsLoader.loadNativeDeps(); + } + // there doesn't appear to be a useful constant in spark to reference. this could break. static final long DEFAULT_XXHASH64_SEED = 42; public static final int MAX_STACK_DEPTH = getMaxStackDepth(); - static { - NativeDepsLoader.loadNativeDeps(); - } - /** * Create a new vector containing spark's 32-bit murmur3 hash of each row in the table. * Spark's murmur3 hash uses a different tail processing algorithm.