Riak Recap for 4/5-4/6

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

Riak Recap for 4/5-4/6

Mark Phillips-4
Hey All -

Hope everyone had a great weekend. I'm in San Francisco through the
end of the week experimenting with coffee, so apologies for the
sporadic emails.

Anyways...some great questions and a must-see slide deck from Kevin
Smith for today's Recap

Enjoy -


Mark Phillips
Community Manager
Basho Technologies


Riak Recap for 4/5-4/6

1) Is there a way to detect when a riak node has rejoined a cluster ?
Will it show members that have dropped off? (from drev1 via IRC)

A ----- Riak-admin status will show you your ring members. If you run
riak-admin, you will see three pieces of info:

connected_nodes : (which should look like this - >
ring_members : (which should look like this - >
ring_ownership : (which should look like this - >

*And, it should be noted, that when a node is off you wouldn't see it
in connected_nodes

2) Is there any way to limit the number of returned results? Something
like GET /riak/bucket?limit=20? (from botanicus via IRC)

A ---- Yes. You can write a reduce phase that returns the first X
items of the result. Written in generic JSON, it would look something
like this:


*It should be noted that because of the asynchronous nature of the
job, order in these results is not preserved. If you require a
specific order, you should sort first with another reduce phase.

More info on reduce phases - >

3) How can I store my map/reduce functions?   (from botanicus via IRC)

A ----- You can store them in a bucket/key or you can add them to the
builtins by putting a JS file in the priv directory. To access said
functions from map/reduce, the code might look like this:

bucket":"my_mr_funs", "key":"some_fun" instead of "source" or "name"
inside the phase object

4) Relating to http://blog.basho.com/2010/02/24/link-walking-by-example
-- I see that a link can have metadata (--data), which seem way cool
to me (thinking about has_many through relationship using just links
no "join tables"). But could this data be another link spec that riak
could follow when walking?  (from bkaney via IRC )

A ----    "(—data)" is just a switch to curl but the typical "has_many
:through" can be easily modeled with links. For example:

if A.has_many :c, :through => :b, you could do that as a link-walk:

5) Kevin Smith (@kevsmith) gave an extensive and awesome Riak
presentation at Charlotte.rb last night that covers Riak basics and
has some great code examples. Slides are available here:


riak-users mailing list
[hidden email]