asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Carey <dtab...@gmail.com>
Subject Re: Install UDF library (NCService option)
Date Mon, 15 Oct 2018 18:51:19 GMT
(We need to update the documentation!)

On 10/15/18 10:58 AM, Xikui Wang wrote:
> Hi Sandra,
>
> The UDF template repo that you used was outdated for some time. There has
> been some UDF refactorization in AsterixDB since that. I've just updated
> the template repo to the latest AsterixDB build. Please pull the latest
> changes before you try again.
>
> If you want to install UDF with the NCService deployment, you would have to
> manually copy the package content into the
> "lib/udfs/DATAVERSE_NAME/LIB_NAME/" directory. You will probably need to
> create all the folders including the "udfs" one. A sample structure of the
> lib directory will be like this:
>
> lib
> ....
> ├── stax-utils-20060502.jar
> └── udfs
>      └── test
>          └── testlib
>              ├── asterix-udf-template-0.1-SNAPSHOT.jar
>              └── library_descriptor.xml
>
> About your previous question, Ansible always relies on SSH even if you
> configure it with localhost only. It treats the localhost as a cluster with
> a single machine. You may want to check the password-less configuration of
> your machine to avoid that problem. If you just to want to find a fast way
> to play around, the NCService deployment would be the right way to go. :)
>
> Best,
> Xikui
>
> On Mon, Oct 15, 2018 at 8:14 AM Ian Maxon <imaxon@uci.edu> wrote:
>
>> You can probably get away with it, yes. Look at what the ansible task
>> to install the UDF does and copy it to the same location, and it'll
>> work.
>>
>> On Mon, Oct 15, 2018 at 7:00 AM Sandra Skarshaug
>> <sandraskarshaug@gmail.com> wrote:
>>> Some follow up information, I have a folder structure inside
>> asterix-server-0.9.3-binary-assembly which looks like the attached image.
>> The files inside testlib are generated when building the following
>> udf-template project: https://github.com/idleft/asterix-udf-template.
>>> When I try to execute the query below, it says function
>> test.testlib#mysum@2 is not defined [CompilationException]
>>>   "use test;
>>>   testlib#mysum(3,4);"
>>>
>>> man. 15. okt. 2018 kl. 11:36 skrev Sandra Skarshaug <
>> sandraskarshaug@gmail.com>:
>>>> Hi!
>>>>
>>>> I am using AsterixDB for my master thesis, and I have some issues I
>> hope you can help me with!
>>>> How do I install a UDF package when I am using NCService, not Ansible?
>> Is it enough to unzip the .jar generated from my project, and add it to
>> asterix-server-0.9.3-binary-assembly/lib/udfs/testlib? Or should I use my
>> local version of asterixdb (the cloned repo), not the one installed through
>> your webpage?
>>>> The following information is found in the cc.log when I put the .jar in
>> the location specified above (lib/udfs/testlib): ssembly/lib/udfs
>>>> Oct 15, 2018 10:41:17 AM org.apache.hyracks.control.cc.CCDriver main
>>>> SEVERE: Exiting CCDriver due to exception
>>>> java.lang.ArrayIndexOutOfBoundsException: 0
>>>> at
>> org.apache.asterix.app.external.ExternalLibraryUtils.getLibraryClassLoader(ExternalLibraryUtils.java:353)
>>>> at
>> org.apache.asterix.app.external.ExternalLibraryUtils.registerLibrary(ExternalLibraryUtils.java:299)
>>>> at
>> org.apache.asterix.app.external.ExternalLibraryUtils.setUpExternaLibraries(ExternalLibraryUtils.java:78)
>>>> at
>> org.apache.asterix.hyracks.bootstrap.CCApplication.start(CCApplication.java:140)
>>>> at org.apache.hyracks.control.cc
>> .ClusterControllerService.startApplication(ClusterControllerService.java:226)
>>>> at org.apache.hyracks.control.cc
>> .ClusterControllerService.start(ClusterControllerService.java:212)
>>>> at org.apache.hyracks.control.cc.CCDriver.main(CCDriver.java:47)
>>>>
>>>>
>>>> I am really looking forward to your answer!
>>>>
>>>> Best regards,
>>>> Sandra Skarshaug

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message