Oozie设置LD_LIBRARY_PATH

时间:2018-03-16 21:14:34

标签: java hadoop oozie oozie-workflow

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

    <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中/画面/

无论如何我的程序似乎没有阅读这些路径,我收到错误

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)

1 个答案:

答案 0 :(得分:0)

我根据@SamsonScharfrichter的建议将属性与oozie.launcher作为前缀,它完美无缺。

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