I have read other threads regarding the missing (or not registered) UDF modules, but the solutions doesn’t seem to work in my case. I have registered a module recombee.lua (using aql), and I can successfully list it and get it using following Python 3 script:
import aerospike
config = {
'hosts': hosts,
'lua': {'user_path': '/opt/aerospike/usr/udf/lua/'}
}
client = aerospike.client(config).connect()
print(client.udf_list())
print(client.udf_get('recombee.lua', aerospike.UDF_TYPE_LUA))
But when I try to apply it:
query = client.query('rcm', 'purchases')
query.apply('recombee', 'interactions_count_by_item_id', ['item-5315'])
res = query.results()
, it fails with
exception.UDFError: (100, 'UDF: Execution Error 1', 'src/main/aerospike/aerospike_query.c', 907)
I turned logging of UDF on according to http://www.aerospike.com/docs/udf/best_practices.html#logging, but I don’t see any errors. On 2 of 3 nodes is output like:
Jan 18 2017 18:38:03 GMT: DEBUG (udf): (udf_record.c:225) [ENTER] Opening record key:<Digest>:0xddb3a2e037037f91c6bfa77cdbf757eb1b85c424
Jan 18 2017 18:38:03 GMT: DEBUG (udf): (udf_record.c:84) [ENTER] Opening record key:<Digest>:0xddb3a2e037037f91c6bfa77cdbf757eb1b85c424
Jan 18 2017 18:38:03 GMT: DEBUG (udf): (udf_record.c:712) [ENTER] rec(0x7fec952180e0) name(itemId)
Jan 18 2017 18:38:03 GMT: DEBUG (udf): (udf_record.c:445) [ENTER] BinName(itemId)
Jan 18 2017 18:38:03 GMT: DEBUG (udf): (udf_record.c:496) [ENTER] urecord(0x7fecbd5dd050) name(0x41e48930)[itemId] dirty(0)
Jan 18 2017 18:38:03 GMT: DEBUG (udf): (udf_record.c:286) [ENTER] Closing record key:<Digest>:0xddb3a2e037037f91c6bfa77cdbf757eb1b85c424
Jan 18 2017 18:38:03 GMT: DEBUG (udf): (udf_record.c:462) [ENTER] NumUpdates(1)
and the third one doesn’t print anything.
Any help appreciated