File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
libs/native/src/main/java/org/elasticsearch/nativeaccess
server/src/main/java/org/elasticsearch/bootstrap
x-pack/plugin/gpu/src/yamlRestTest/java/org/elasticsearch/xpack/gpu Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 99
1010package org .elasticsearch .nativeaccess ;
1111
12+ import org .elasticsearch .logging .LogManager ;
13+
14+ import java .lang .foreign .Arena ;
15+ import java .lang .foreign .SymbolLookup ;
1216import java .nio .file .Path ;
1317import java .util .Optional ;
1418import java .util .OptionalLong ;
1822 */
1923public interface NativeAccess {
2024
25+ static void loadCuvs () {
26+ var libCuvs = SymbolLookup .libraryLookup (System .mapLibraryName ("cuvs_c" ), Arena .ofAuto ());
27+ LogManager .getLogger (NativeAccess .class ).info ("Loaded libcuvs_c.so: " + libCuvs );
28+ }
29+
2130 /**
2231 * Get the one and only instance of {@link NativeAccess} which is specific to the running platform and JVM.
2332 */
Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ private static void initPhase2(Bootstrap bootstrap) throws IOException {
183183 bootstrap .spawner ().spawnNativeControllers (nodeEnv );
184184
185185 nodeEnv .validateNativesConfig (); // temporary directories are important for JNA
186+ NativeAccess .loadCuvs ();
186187 initializeNatives (
187188 nodeEnv .tmpDir (),
188189 BootstrapSettings .MEMORY_LOCK_SETTING .get (args .nodeSettings ()),
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ public class GPUClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
2121 .module ("gpu" )
2222 .setting ("xpack.license.self_generated.type" , "trial" )
2323 .setting ("xpack.security.enabled" , "false" )
24+ .environment ("LD_LIBRARY_PATH" , System .getenv ("LD_LIBRARY_PATH" ))
2425 .build ();
2526
2627 public GPUClientYamlTestSuiteIT (final ClientYamlTestCandidate testCandidate ) {
You can’t perform that action at this time.
0 commit comments