Aerospike LDT限制/排序

时间:2015-06-29 19:08:22

标签: aerospike

我们希望以反向时间顺序存储一些事件。我们需要检索在给定时间之前发生的x个事件。

查看java apis,LargeList.findFrom(Value begin,int count)似乎是我们应该使用的完美方法。但是使用该方法会引发以下错误:

    Error Code 100: function not found
    com.aerospike.client.AerospikeException: Error Code 100: function not found
at com.aerospike.client.command.ReadCommand.handleUdfError(ReadCommand.java:154)
at com.aerospike.client.command.ReadCommand.parseResult(ReadCommand.java:118)
at com.aerospike.client.command.SyncCommand.execute(SyncCommand.java:56)
at com.aerospike.client.AerospikeClient.execute(AerospikeClient.java:1016)
at com.aerospike.client.large.LargeList.findFrom(LargeList.java:233)

以下是findFrom()方法的源代码:

public List<?> findFrom(Value begin, int count) throws AerospikeException {
return (List<?>)client.execute(policy, key, PackageName, "find_from", binName, begin, Value.get(count));
}

我们是否需要定义&#34; find_from&#34;功能?或者它应该是Aerospike安装的一部分?

从LLIST返回限制结果的正确方法是什么?

1 个答案:

答案 0 :(得分:1)

我正在运行Build:3.4.1在vagrant vm上运行。安装Build#3.5.12后,这不再是一个问题。我现在可以毫无问题地限制结果。

不确定这是一个错误还是添加到3.4.1之后的版本的内容,但现在可以正常运行。