Manipulating CRDTs inside commit hooks/mapreduces

Cezary Kosko koskocezarym at
Sat May 2 05:12:54 EDT 2015


I've got a situation where I'd like to create a new map record with some
data inside a commit hook or a mapreduce job and then push it into Riak.

Some questions here:
1. Do I call riak_kv_crdt:new with the proper Bucket, Key & to_mod("map")?
Does that overwrite what's in Riak, by any chance?
2. Can some1 give me an example of how to use riak_kv_crdt:update_crdt? I
assume I'm supposed to use that one.
3. To upload the data, do I treat the worked on map as regular data and
then store it using riak_client:put?

Or perhaps is there a more-recommended way to do that?

Kind regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list