Oozie 设置 LD_LIBRARY_PATH

Oozie setting LD_LIBRARY_PATH

我是 运行 一个 java 程序(不是 MR),来自 oozie。这是指一些本机库,我尝试设置以下

    <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>