Skip to content

Instantly share code, notes, and snippets.

@PharkMillups
Created February 7, 2011 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PharkMillups/814901 to your computer and use it in GitHub Desktop.
Save PharkMillups/814901 to your computer and use it in GitHub Desktop.
09:36 <herewego> Anyone know if you can run multiple reduce phases in a map/reduce query?
09:37 <seancribbs> herewego: yes. you can put them together in any combination
09:37 <seancribbs> with the constraint, of course, that map phases receive lists of bucket/key[/keydata]
09:38 <herewego> so i can run a sort reduce phase after a my own custom reduce phase, correct?
09:38 <herewego> feeding one reduce into the other?
09:39 <seancribbs> yep
09:39 <seancribbs> absolutely
09:40 <herewego> ok, cool
09:43 <herewego> i'm wondering if maybe it would be advantageous to not do the sort reduce phase
in Riak and instead do it after the fact on our web servers
09:43 <herewego> just thinking about how i can offload processing from Riak
(expensive, high io) to the web servers (cheap, low io)
09:45 <seancribbs> herewego: well, once you get to reduce, it's not on disk, it's more in RAM
09:46 <seancribbs> so there is the concern that you can exhaust RAM
if your collection is too big
09:46 <seancribbs> but other than that, it won't make much difference if you do it client side or in Riak
09:46 <herewego> right, and i suppose that's an issue on either end
09:46 <seancribbs> yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment