map-db

Ildar Alishev ildaralishev at gmail.com
Wed Jan 21 04:28:10 EST 2015


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. 

Can anyone help me?

Ildar







More information about the riak-users mailing list