Riak Sort on MapReduce

2012-03-17 Thread James Proud
function(values) { return values.sort( function(a, b) { return b['timestamp'] - a['timestamp']; } ); } I'm currently executing the above code for the reduce phase of a Riak MapReduce query but it is not correctly sorting by the value of timestamp key. Any ide

Re: Open end range query in secondary indexes?

2012-03-17 Thread Daniil Churikov
Yes it could be done like this: {ok, C} = riakc_pb_socket:start_link("localhost", 8087), riakc_pb_socket:mapred(C, {index, <<"bucket">>, <<"$key">>, <<"XX">>, <<"YY">>}, [{map, {qfun, riak_kv_mapreduce, map_object_value}, none, true}]) -- View this message in context: http://riak-users.197444.n3.

Re: High Swap Utilization of Riak

2012-03-17 Thread Daniil Churikov
I could confirm this, my 2-node cluster have leveledb backend and high write intensity. After about half of hour it consume all RAM and begins slow down. I use etop to diagnose which erlang process holds the memory and didnt findt it. Thought htop says that all memory splitted between beam processe