我正在与航空公司开始新的项目,并想测试MapOperation。但是我所有的测试都失败了,都有相同的错误。
以下是测试示例
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));这是错误的
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进行特定的设置吗?还是我做错了什么?
发布于 2016-09-08 22:49:14
我设法运行了这个测试。
问题在于,MapOperation仅在3.9.1.1版本中受支持
https://stackoverflow.com/questions/39383368
复制相似问题