map-db

Christopher Meiklejohn christopher.meiklejohn at gmail.com
Wed Jan 21 05:37:12 EST 2015


On Wed, Jan 21, 2015 at 10:28 AM, Ildar Alishev <ildaralishev at gmail.com> wrote:
> Hello everyone.
>
> Have a few questions concerning connecting Erlang (it is client) and Riak 2.0.2
>
> so question is.
>
> i have created and compiled two functions using erlang
>
> -module(unity).
> -export([map_phase/3, reduce_phase/2]).
>
> map_phase(Value, KeyData, Arg) ->
>              [dict:from_list([{I, 1}
>               || I <- binary_to_term(riak_object:get_value(Value))])].
>
>
> reduce_phase(ValueList, _Arg) ->
>              [lists:foldl(fun(Value, Acc) ->
>                             dict:merge(fun(_, X, Y) -> X+Y end,
>                                        Value, Acc)
>                           end,
>                           dict:new(),
>                           ValueList)].
>
>
> so, now, since i’m using it for uGameDb (want to connect Unity3d and ugameDb), i cannot connect it.
> Using Unity3d i’m calling MapReduce and… nothing happens. Really, nothing, no errors, nothing.

Hi Ildar,

Can you share the code you are using to execute the MapReduce job to
allow us to debug further?

Thanks,
- Chris




More information about the riak-users mailing list