-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43782 from zakkak/2024-10-09-fix-43319
Move rocksdb native library resource registration to a feature
- Loading branch information
Showing
2 changed files
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
15 changes: 15 additions & 0 deletions
15
...ams/runtime/src/main/java/io/quarkus/kafka/streams/runtime/graal/KafkaStreamsFeature.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package io.quarkus.kafka.streams.runtime.graal; | ||
|
||
import org.graalvm.nativeimage.hosted.Feature; | ||
import org.graalvm.nativeimage.hosted.RuntimeResourceAccess; | ||
import org.rocksdb.util.Environment; | ||
|
||
public class KafkaStreamsFeature implements Feature { | ||
|
||
@Override | ||
public void afterRegistration(AfterRegistrationAccess access) { | ||
String libraryFileName = Environment.getJniLibraryFileName("rocksdb"); | ||
RuntimeResourceAccess.addResource(Environment.class.getModule(), libraryFileName); | ||
} | ||
|
||
} |