-
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 #40304 from cescoffier/snappy-shared-classloader
- Loading branch information
Showing
4 changed files
with
56 additions
and
9 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
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
18 changes: 18 additions & 0 deletions
18
...ions/kafka-client/runtime/src/main/java/io/quarkus/kafka/client/runtime/SnappyLoader.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,18 @@ | ||
package io.quarkus.kafka.client.runtime; | ||
|
||
import java.io.File; | ||
|
||
public class SnappyLoader { | ||
|
||
/* | ||
* This class is intended to be loaded from a shared classloader (e.g., the system classloader) to avoid | ||
* unsatisfied link errors when the native library is loaded from a different classloader. | ||
* See https://github.com/quarkusio/quarkus/issues/39767. | ||
* | ||
* This class is only used in tests if the `quarkus.kafka.snappy.load-from-shared-classloader=true` is set. | ||
*/ | ||
static { | ||
File out = SnappyRecorder.getLibraryFile(); | ||
System.load(out.getAbsolutePath()); | ||
} | ||
} |
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