You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Xiaobin <cz...@foxmail.com> on 2020/04/16 11:29:36 UTC
回复: loading native library in hive UDF
Thank you Kumar, It works!
How about the second Question: I add an archive file (*.tar.gz) by using ADD ARCHIVE *.tar.gz, it seems that this file is not unarchived automatically. I am also confused.
------------------ 原始邮件 ------------------
发件人: "Manoj Kumar"<manojk@bigzetta.com>;
发送时间: 2020年4月15日(星期三) 下午2:00
收件人: "Xiaobin"<czwangxiaobin@foxmail.com>;
抄送: "user"<user@hive.apache.org>;
主题: Re: loading native library in hive UDF
Hi,
Maybe you can try adding native libraries (*.so) files along with its all dependent libs (*.so) in
hadoop-{version}/lib/native
$ld libcustom.so --> should show all shared libs resolved from local hadoop-{version}/lib/native folder
Above path is shared across the hadoop ecosystem and make sure to add so with its all dependent libs on all nodes .
On Wed, Apr 15, 2020 at 7:23 AM Xiaobin <czwangxiaobin@foxmail.com> wrote:
Hi, all:
I'm a beginner of hive. Recently I want to implement a UDF in hive and this function is code with java but call some method written in C++. So my UDF need to load some native libraries (*.so). I have already added the so to hive by using Add file *.so. But it seems that hive doesn't add these so to the LD_LIBRARY_PATH automatically, thus, UDF throws 'no so in java.library.path' exception. I have almost searched the whole internet but got nothing helpful. Have you got any idea of this?
By the way, I add an archive file (*.tar.gz) by using ADD ARCHIVE *.tar.gz, it seems that this file is not unarchived automatically. I am also confused.
Thank you.
Best
BIN
--
Regards,Manoj Kumar