From 4358580f1f54e409786149049981b8bec16d2817 Mon Sep 17 00:00:00 2001 From: Navin Kumar <97137715+NVnavkumar@users.noreply.github.com> Date: Tue, 2 Jan 2024 07:49:12 -0800 Subject: [PATCH] Make the GpuTimeZoneDB class idempotent, such that when it is shutdown, it can be recovered and useable again (#1670) --- src/main/java/com/nvidia/spark/rapids/jni/GpuTimeZoneDB.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/nvidia/spark/rapids/jni/GpuTimeZoneDB.java b/src/main/java/com/nvidia/spark/rapids/jni/GpuTimeZoneDB.java index 0eb56100e4..b63a9dc282 100644 --- a/src/main/java/com/nvidia/spark/rapids/jni/GpuTimeZoneDB.java +++ b/src/main/java/com/nvidia/spark/rapids/jni/GpuTimeZoneDB.java @@ -90,6 +90,8 @@ public Thread newThread(Runnable r) { public static void shutdown() { if (instance.isLoaded()) { instance.close(); + // Recreate a new instance to reload the database if necessary + instance = new GpuTimeZoneDB(); } }