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( at com.aerospike.client.lua.LuaCache.getInputStream( at com.aerospike.client.lua.LuaCache.loadPackage( at com.aerospike.client.lua.LuaInstance.load( at com.aerospike.client.query.QueryAggregateExecutor.runThreads( at at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at ^

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:


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.