首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Aerospike地图操作失败

Aerospike地图操作失败
EN

Stack Overflow用户
提问于 2016-09-08 13:46:19
回答 1查看 254关注 0票数 2

我正在与航空公司开始新的项目,并想测试MapOperation。但是我所有的测试都失败了,都有相同的错误。

以下是测试示例

代码语言:javascript
复制
    IAerospikeClient client = new AerospikeClientProvider(config).get();

    Key key = new Key("test", "other", "other:1");
    client.delete(client.getWritePolicyDefault(), key);

    Map<Value,Value> inputMap = new HashMap<Value,Value>();
    inputMap.put(Value.get(1), Value.get(55));
    inputMap.put(Value.get(2), Value.get(33));

    // Write values to empty map.
    Record record = client.operate(client.getWritePolicyDefault(), key, 
            MapOperation.putItems(MapPolicy.Default, "mapbin", inputMap));

这是错误的

代码语言:javascript
复制
com.aerospike.client.AerospikeException: Error Code 4: Parameter error
at com.aerospike.client.command.ReadCommand.parseResult(ReadCommand.java:121)
at com.aerospike.client.command.SyncCommand.execute(SyncCommand.java:57)
at com.aerospike.client.AerospikeClient.operate(AerospikeClient.java:697)
at de.ascendro.f4m.server.AerospikeDaoTest.operateMapPut(AerospikeDaoTest.java:207)

我正在使用Aerospike 3.8.2.3和Aerospike client 3.2.4,我需要为Aerospike或客户端运行MapOperation进行特定的设置吗?还是我做错了什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-09-08 22:49:14

我设法运行了这个测试。

问题在于,MapOperation仅在3.9.1.1版本中受支持

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39383368

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档