'CDP Impala UDF fails loading at runtime a C++ shared library

I wrote a Java UDF for Impala with this command (inside impala-shell):

create function my_function location 'my_jar_file_path' symbol='myPackage.myClassName';

This UDF needs to load a shared C ++ library at runtime (to call a function contained in the library).

when i run the function inside impala i get the following error:

ImpalaRuntimeException: UDF::evaluate() ran into a problem.
CAUSED BY: ImpalaRuntimeException: UDF failed to evaluate
CAUSED BY: InvocationTargetException: null
CAUSED BY: UnsatisfiedLinkError: no in java.library.path

how can I tell Impala where to look for shared library that java jar needs?
(something like a "java -Djava.library.path" when I run jar file from a linux shell)

Many thanks in advance!

Moreno



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source