Is there a way to get a list of keys from Riak, which were modified since a specified time? A stream of changes would be equally good. MapReduce is not a recommended way.
Asked
Active
Viewed 182 times
3 Answers
1
There are a couple of possible solutions to this problem (all of which have their advantages and disadvantages):
- Search (Solr) range queries if your object is a JSON or XML document (http://docs.basho.com/riak/kv/2.2.0/developing/usage/search/)
- Secondary Indexes and range queries where date is the 2i (http://docs.basho.com/riak/kv/2.2.0/developing/usage/secondary-indexes/)
- Date bounded sets (http://docs.basho.com/riak/kv/2.2.0/developing/data-types/sets/) that contain a list of keys added during a predefined time period
If you can use Riak TS it supports SQL and makes selecting records by date/time range quite easy.

Craig
- 1,001
- 6
- 11
0
It seems that commit hooks are the closesest thing to a solution. Pre-commit hooks may be written in JavaScript, so I can trigger a HTTP request or append to a change log.

Andor
- 5,523
- 5
- 26
- 24
0
you can also use secondary indexes to tag your keys with the time they were added, and perform time-range requests

dams
- 399
- 1
- 5