Problem with r_object and riak-erlang-client compatibility

Alex Turkin snowwlex at gmail.com
Wed May 14 07:24:35 EDT 2014


Hello guys, 

I have following case:

I get the list of objects from riak by mapreduce, and then want to change
some of them, and update it via riakc_pb_socket:put.

But the problem is, that 

riakc_pb_socket:mapred( 
    Conn, 
    Index
    [{map, {modfun, riak_kv_mapreduce, map_identity}, undefined, true}] 
).

returns list of #r_object{}, when riakc_pb_socket:put requires #riakc_obj{}. 


What's the best way to solve the problem? 
Is there some convenient way to do it rather than writing my own convertion
function? I don't want to be dependent on riak internal data structures in
my code...


PS I've seen the thread with the same question
http://riak-users.197444.n3.nabble.com/MapReduce-returned-value-can-t-be-processed-by-riakc-obj-get-value-td3862992.html
but there's no appropriate solution for me.



--
View this message in context: http://riak-users.197444.n3.nabble.com/Problem-with-r-object-and-riak-erlang-client-compatibility-tp4031118.html
Sent from the Riak Users mailing list archive at Nabble.com.




More information about the riak-users mailing list