I have an Aerospike cache consists of list of data with value of json like structure.
example value: {"name": "John", "count": 10}
I wanted to scan for all records and reset count to zero. What would be a good option to handle this problem?
I have an Aerospike cache consists of list of data with value of json like structure.
example value: {"name": "John", "count": 10}
I wanted to scan for all records and reset count to zero. What would be a good option to handle this problem?
Copyright © 2021 Jogjafile Inc.
I think the best way to do this would be to leverage the background operations... I just tried the following code on the Aerospike sandbox and it did update all the 'shape' entries in the 'report' map to
updated shape
. (Disclaimer: I am not a developer so there may be really bad ways of doing things in Java in general but this hopefully shows how to do a background operation scan in Aerospike)Run the 'setup' tab and then copy paste this in the create tab (or in the blank tab) and run:
You can change this to a secondary index query (if defined) or add further filters on the map bin itself...
Here are a couple of tutorials that may help: