You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by Tim Armstrong <ta...@cloudera.com> on 2016/04/18 07:46:38 UTC

Re: Create Function with .ll file

Moving to the Apache Incubator list (our new impala-dev list).

Hi Zuo,
  We can't really help without more details.

Did you get any messages in your impalad logs? Any hs_err_pid*.log files?

How did you produce the ll file? It should be an LLVM 3.3 bitcode file for
recent release of Impala.

- Tim

On Sun, Apr 17, 2016 at 1:35 AM, WANG Zuo (王佐) <wa...@wanda.cn> wrote:

> Hi -
>
>
>
> I wrote a UDF, it works with .so file, but fail with .ll file. Could
> anybody help me on this?
>
>
>
> I ran below commands in impala-shell. It works fine.
>
> create function aes_decrypt(string,string) returns string location
> '/user/xxx/libaes- deencrypt.so' symbol='AES_Decrypt';
>
> select aes_decrypt(unhex('CBA4ACFB309839BA426E07D67F23564F'),
> '1234567890123456');
>
>
>
> But when I ran below commands. It crashed my impalad.
>
> create function aes_decrypt_ir(string,string) returns string location
> '/user/xxx/aes-deencrypt.ll' symbol='AES_Decrypt';
>
> select aes_decrypt_ir(unhex('CBA4ACFB309839BA426E07D67F23564F'),
> '1234567890123456');
>
>
>
>
>
> Best Regards,
>
> Zuo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Impala Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to impala-dev+unsubscribe@cloudera.org.
>

答复: Create Function with .ll file

Posted by "WANG Zuo (王佐)" <wa...@wanda.cn>.
Hi, Tim

I did’t see any impalad logs related to the error.
Here is my change in be/src/udf_samples/CMakeLists.txt.  I compiled aes-deencrypt.cc to libaes-deencrypt.so and aes-deencrypt.ll. But now the .so file is OK but .ll file crashed my impalad.
set(CRYPTOPP_INCLUDE_DIR "/home/dev/Impala/cryptopp")
set(CRYPTOPP_LIBS "/home/dev/Impala/cryptopp/libcryptopp.a")
include_directories(${CRYPTOPP_INCLUDE_DIR})
add_library(aes-deencrypt SHARED aes-deencrypt.cc)
add_dependencies(aes-deencrypt thrift-deps)
target_link_libraries(aes-deencrypt ${CRYPTOPP_LIBS})

COMPILE_TO_IR(aes-deencrypt.cc )
add_dependencies(aes-deencrypt-ir thrift-deps)
target_link_libraries(aes-deencrypt-ir ${CRYPTOPP_LIBS})


Best Regards,
Zuo

发件人: Tim Armstrong [mailto:tarmstrong@cloudera.com]
发送时间: 2016年4月18日 13:47
收件人: WANG Zuo (王佐); dev@impala.incubator.apache.org
主题: Re: Create Function with .ll file

Moving to the Apache Incubator list (our new impala-dev list).

Hi Zuo,
  We can't really help without more details.

Did you get any messages in your impalad logs? Any hs_err_pid*.log files?

How did you produce the ll file? It should be an LLVM 3.3 bitcode file for recent release of Impala.

- Tim

On Sun, Apr 17, 2016 at 1:35 AM, WANG Zuo (王佐) <wa...@wanda.cn>> wrote:
Hi -

I wrote a UDF, it works with .so file, but fail with .ll file. Could anybody help me on this?

I ran below commands in impala-shell. It works fine.
create function aes_decrypt(string,string) returns string location '/user/xxx/libaes- deencrypt.so' symbol='AES_Decrypt';
select aes_decrypt(unhex('CBA4ACFB309839BA426E07D67F23564F'), '1234567890123456');

But when I ran below commands. It crashed my impalad.
create function aes_decrypt_ir(string,string) returns string location '/user/xxx/aes-deencrypt.ll' symbol='AES_Decrypt';
select aes_decrypt_ir(unhex('CBA4ACFB309839BA426E07D67F23564F'), '1234567890123456');


Best Regards,
Zuo
--
You received this message because you are subscribed to the Google Groups "Impala Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to impala-dev+unsubscribe@cloudera.org<ma...@cloudera.org>.