Closed Osguima3 closed 8 years ago
I researched a bit more, and all that would be needed is:
import org.luaj.vm2.LoadState;
public LuaInstance() throws AerospikeException {
...
LoadState.install(globals);
}
We will add "LoadState.install(globals);" at the end of the LuaInstance constructor in the next java client release.
Java client has been released.
This lua method is not available in this client, while other clients, like the node.js one, do. We use this method to dynamically generate aggregation functions.
I was able to use this method by previously registering it manually so that Aerospike gets an instance with the method loaded. (This is a hacky way, probably there is a better one):
and then in lua
But this doesn't solve the problem if Aerospike decides it needs more instances than what the pool currently has.