Riak Recap for 4/1/2010

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Riak Recap for 4/1/2010

Mark Phillips-4
Hey All -

Just a few orphaned questions and a blog post you should all check out.

Happy Friday,



 *Riak Recap for 4/1/2010

1) When I do this: var data = Riak.mapValuesJson(value); My object
properties are at index 0 of an array - i.e. data[0].title - not
data.title. This doesn't mesh with the samples I've seen - is it
expected? (from bubbafat via Twitter)

A----- It seems the examples are in error -- it will always return an
array, even if there's only one value.  See

2) The mapred interface allows key inputs from mixed buckets (i.e.
[["Movies","123"],["Ratings","12-123"],...] but does not allow
multiple complete buckets (i.e.[["Movies"],["Ratings"]...]) - is this
correct? Or more generally - this appears to be true in 0.9.1 - is
there any plan to change either of those? (from bubbafat via IRC)

A----- Although it has its uses, we generally discourage running
queries across entire buckets for performance reasons, so the short
answer is that there is no plan to change the existing implementation.
One way to overcome this would be to insert a map phase at the
beginning that emits known keys in the second bucket based on the key
or object in the first bucket. Example:

function(value, keyData, arg){
  if(value.bucket == "Movies")
    return [[value.bucket, value.key], ["Books", value.key]];
    return [[value.bucket, value.key]];

3) @bkaney posted a great write up of the nosql workshop held at the
Vermonster offices in Boston. It's packed with excellent info and
examples of MapReduce and Link Walking in Riak. Check it out if you
haven't already done so:


riak-users mailing list
[hidden email]