How to set spark.driver.extraLibraryPath in EMR Serverless

0

Hello, i tried run JNI code which uses the file as a dependency libMylibName.so. Before(not in EMR Serverless) i can use it just specify --conf spark.driver.extraLibraryPath=/path_to_my_lib and --conf spark.executor.extraLibraryPath=/path_to_my_lib , but this options not supported in Serverless following here documentation i found similar answer for python, but it not suit for me post, because i use Scala

Error which i got if not specify spark.driver.extraLibraryPath and spark.executor.extraLibraryPath= Exception in thread "main" java.lang.UnsatisfiedLinkError: no MylibName in java.library.path

Question: how i can specify this dependency for my spark application?

FYI: --conf spark.driver.extraJavaOptions="-Djava.library.path=s3://path_to_libs" also not work correct it changed java.library.path Variable but i continue got UnsatisfiedLinkError Enter image description here

已提问 1 年前1025 查看次数
1 回答
1

I found the solution on my own and publish it here:

--conf spark.archives=s3://path_to_file/my_libs_so.tar.gz#my_libs --conf spark.executor.extraJavaOptions="-Djava.library.path=/home/hadoop/my_libs" --conf spark.driver.extraJavaOptions="-Djava.library.path=/home/hadoop/my_libs"

Archive my_libs_so.tar.gz should contains all your the necessary *.so files

已回答 1 年前
AWS
专家
已审核 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则