gpt4 book ai didi

java - Oozie 设置 LD_LIBRARY_PATH

转载 作者:行者123 更新时间:2023-12-02 20:42:29 27 4
gpt4 key购买 nike

我正在通过 oozie 运行一个 java 程序(不是 MR)。这是指一些 native 库,我尝试设置以下

    <configuration>
<property>
<name>mapreduce.map.env</name>
<value>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/tableau/</value>
</property>
<property>
<name>mapreduce.child.env</name>
<value>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/tableau/</value>
</property>
<property>
<name>mapreduce.admin.user.env</name>
<value>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/tableau/</value>
</property>
<property>
<name>mapreduce.reduce.env</name>
<value>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/tableau/</value>
</property>
<property>
<name>mapred.child.java.opts</name>
<value>-Djava.library.path=/usr/lib/tableau/</value>
</property>
</configuration>

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/tableau/

无论如何,我的程序似乎没有读取这些路径,我收到了错误
java.lang.UnsatisfiedLinkError: Unable to load library 'TableauHyperExtract': libTableauHyperExtract.so: cannot open shared object file: No such file or directory
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:194)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:283)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:244)
at com.sun.jna.Native.register(Native.java:1065)
at com.tableausoftware.hyperextract.ExtractAPI.<clinit>(Unknown Source)

最佳答案

我按照@SamsonScharfrichter 的建议为属性添加了 oozie.launcher 前缀,并且效果很好。

 <property>
<name>oozie.launcher.mapreduce.map.env</name>
<value>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/tableau/</value>
</property>

关于java - Oozie 设置 LD_LIBRARY_PATH,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49329620/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com