feat(java/driver/jni): support loading JNI library from external path - #1
Open
metegenez wants to merge 4 commits into
Open
feat(java/driver/jni): support loading JNI library from external path#1metegenez wants to merge 4 commits into
metegenez wants to merge 4 commits into
Conversation
Allow embedders to load the JNI native library from a custom path by setting the `arrow.adbc.driver.jni.library.path` JVM system property. When set, JniLoader tries to load the library from that directory first, falling back to JAR extraction if the file is not found. This is consistent with the approach used by arrow-java's JniLoader. Closes apache#4207
Allow embedders to load the JNI native library from a custom path by setting the `arrow.adbc.driver.jni.library.path` JVM system property. When set, JniLoader tries to load the library from that directory first, falling back to JAR extraction if the file is not found. This is consistent with the approach used by arrow-java's JniLoader. Extract resolveLibraryPath() as a package-private static method so the path resolution logic can be unit tested independently of native loading. Closes apache#4207
Allow embedders to load the JNI native library from a custom path by setting the `arrow.adbc.driver.jni.library.path` JVM system property. When set, JniLoader tries to load the library from that directory first, falling back to JAR extraction if the file is not found. This is consistent with the approach used by arrow-java's JniLoader. Add JniLibraryResolver to separate path resolution from native loading, enabling unit testing without triggering JNI class initialization. Closes apache#4207
Allow embedders to load the JNI native library from a custom path by setting the `arrow.adbc.driver.jni.library.path` JVM system property. When set, JniLoader tries to load the library from that directory first, falling back to JAR extraction if the file is not found. This is consistent with the approach used by arrow-java's JniLoader. Extract JniLibraryResolver to own all path resolution logic (custom path, JAR resource path, arch normalization), keeping JniLoader focused on loading. This also enables unit testing without triggering JNI class initialization. Closes apache#4207
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
arrow.adbc.driver.jni.library.pathJVM system property to load the JNI native library from a custom directory. Falls back to JAR extraction when the property is unset or the file is not found.Consistent with arrow-java's JniLoader approach.
Closes apache#4207