Error when AerospikeClient.queryAggregate tries to load lua functions

I am trying to do an AerospikeClient.aggregateQuery and end up with the error below. I believe that the client is trying to send my lua file to aerospike even though I already did this in a previous client.register. Also it is assuming directory structure and file paths that are incorrect. Is there a way around this function trying to auto load my lua file.

com.aerospike.client.AerospikeException: Failed to read file: /apps/code/git/core-data/udf/call_ringing_sfilter.lua at com.aerospike.client.lua.LuaCache.getUserStream(LuaCache.java:87) at com.aerospike.client.lua.LuaCache.getInputStream(LuaCache.java:60) at com.aerospike.client.lua.LuaCache.loadPackage(LuaCache.java:48) at com.aerospike.client.lua.LuaInstance.load(LuaInstance.java:104) at com.aerospike.client.query.QueryAggregateExecutor.runThreads(QueryAggregateExecutor.java:101) at com.aerospike.client.query.QueryAggregateExecutor.run(QueryAggregateExecutor.java:86) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) ^

Register is for the server’s benefit. The client still needs to read the Lua script as well.

Lua scripts for aggregation queries run on both the client and server. The client runs the Lua script for the final reduce from data returned from each node in the cluster. The client looks for the Lua script in the following static string:

 LuaConfig.SourceDirectory     

The default is “udf” off the current directory.

So if I understand you correctly, the AeroSpike Java Client is interpreting and running lua code?

My main problem is that the AeroSpike Java Client has been written as a File centric system and I am accessing my lua scripts from within a jar. I won’t be able to use aggregate until a url / stream centric system is added to the Java Client.

Yes, the java client interprets and runs lua code.

The latest java client 3.1.0 includes the ability to read lua scripts from a resource.