I want to use some simple record UDF but dont want to introduce a new lua file in my repository. I am trying following . NOTE: using C client
- Storing stringified escapped udf content in a variable (content is typed to bytes)
- Registering UDF by using some module name (It is being registered properly I can see it using “SHOW MODULES” )
- Using UDF (with same module name and function) - this part is failing
Logs:
Summary
Jul 04 2019 06:38:17 GMT: DEBUG (udf): (udf_record.c:235) [ENTER] Closing record key:<Digest>:0x366ff798e0b59f5f10afe46a25488a6d477f78fe
Jul 04 2019 06:38:17 GMT: DEBUG (udf): (udf_record.c:363) [ENTER] NumUpdates(0)
Jul 04 2019 06:38:17 GMT: INFO (udf): (udf.c:982) lua error, ret:1
Jul 04 2019 06:38:17 GMT: DEBUG (udf): (udf_record.c:235) [ENTER] Closing record key:<Digest>:0x366ff798e0b59f5f10afe46a25488a6d477f78fe
Jul 04 2019 06:38:17 GMT: DEBUG (udf): (udf_record.c:363) [ENTER] NumUpdates(0)
Jul 04 2019 06:38:17 GMT: DEBUG (udf): (udf_record.c:72) [ENTER] Opening record key:<Digest>:0x79353703f11d8e8166e1a8ffabb166027dfca909
Jul 04 2019 06:38:17 GMT: WARNING (udf): (src/main/mod_lua.c:620) Lua Create Error: module 'mapping.lua' not found:
no field package.preload['mapping.lua']
no file './mapping/lua.lua'
no file '/usr/local/share/luajit-2.0.3/mapping/lua.lua'
no file '/usr/local/share/lua/5.1/mapping/lua.lua'
no file '/usr/local/share/lua/5.1/mapping/lua/init.lua'
no file '/opt/aerospike/sys/udf/lua/mapping/lua.lua'
no file '/opt/aerospike/sys/udf/lua/external/mapping/lua.lua'
no file '/opt/aerospike/usr/udf/lua/mapping/lua.lua'
no file './mapping/lua.so'