Class NativeLibraryLoader

java.lang.Object
org.apache.datafusion.NativeLibraryLoader

public final class NativeLibraryLoader extends Object
Loads the datafusion_jni native library on demand.

The loader first tries System.loadLibrary(String) so that operators can override the bundled library by placing a build on java.library.path (for example via -Djava.library.path=... or LD_LIBRARY_PATH). If that fails the loader extracts the platform-specific library from the JAR resource tree and loads it via System.load(String).

The bundled libraries live at the conventional path org/apache/datafusion/<os>/<arch>/<libfile>. Each JVM extracts into its own private temporary directory created with Files.createTempDirectory(String, java.nio.file.attribute.FileAttribute[]), which is mode 0700 on POSIX and user-private under the default Windows TMP. Keeping the directory private prevents another user on the host from planting a same-named library for the JVM to pick up.

  • Method Details

    • loadLibrary

      public static void loadLibrary()