Multiple functions of any phase type are allowed. They're performed on the 
coordinating node and you can force Riak to wait for all data to arrive before 
perform a reduce [1].

There's a thread from June 2010 talking about working with multiple Map phases 
[2] as well as this delightful Basho blog post [3].

[1]: http://wiki.basho.com/MapReduce.html#Configuration-Tuning-for-Reduce-Phases
[2]: 
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2010-June/001418.html
[3]: 
http://basho.com/blog/technical/2010/04/14/practical-map-reduce:-forwarding-and-collecting/
---
Jeremiah Peschka - Founder, Brent Ozar PLF, LLC
Microsoft SQL Server MVP

On Oct 28, 2011, at 7:05 AM, Dmitry Demeshchuk wrote:

> Why do you need such a way?
> 
> If you have some certain list of operations to perform on each object,
> you can just combine them inside a body of a single map function.
> 
> If this list is dynamic and may vary depending on a situation – you
> can pass the list of functions to execute as the second parameter to
> the map function.
> 
> On the contrary, reduce functions cannot be combined like that – you
> generally need to gather all the results of a previous reduce to get a
> consistent result of the next one. So, multiple reduce functions are
> not just allowed, but sometimes even necessary.
> 
> On Fri, Oct 28, 2011 at 5:59 PM, Lyes zaiko <[email protected]> wrote:
>> Hi all!
>> I want to execute a mapreduce query, in erlang, that contains two map phases
>> such that the Map2 function takes the result of the Map1 function as input.
>> Is it possible and if, what must be the return value of each map phase
>> Thank you!
>> _______________________________________________
>> riak-users mailing list
>> [email protected]
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>> 
>> 
> 
> 
> 
> -- 
> Best regards,
> Dmitry Demeshchuk
> 
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to