on macos 10.6.3 using riak-0.9.1 following instructions at
https://wiki.basho.com/display/RIAK/Installing+on+Mac+OS+X
install and test passed without issue.
then tried the erland mapreduce example at
https://wiki.basho.com/display/RIAK/MapReduce#MapReduce-MapReduceviatheErlangAPI

~/FromFtp/riak/riak-0.9.1/erts-5.7.5/bin/erl -name
[email protected] riak -pa
`pwd`/lib/riak-0.9.1.ez/riak-0.9.1/ebin
Erlang R13B04 (erts-5.7.5) [source] [smp:2:2] [rq:2] [async-threads:0]
[hipe] [kernel-poll:false]

Eshell V5.7.5  (abort with ^G)
([email protected])1> code:which(riak).
"~/FromFtp/riak/riak-0.9.1/lib/riak-0.9.1.ez/riak-0.9.1/ebin/riak.beam"
([email protected])2> {ok, Client} = riak:client_connect('[email protected]
').
{ok,{riak_client,'[email protected]',<<6,202,197,138>>}}
([email protected])4> Count = fun(G, undefined, none) ->
([email protected])4>              [dict:from_list([{I, 1} || I <-
riak_object:get_value(G)])]
([email protected])4>            end.
#Fun<erl_eval.18.105910772>
([email protected])5> Merge = fun(Gcounts, none) ->
([email protected])5>              [lists:foldl(fun(G, Acc) ->
([email protected])5>                             dict:merge(fun(_, X, Y)
-> X+Y end,
([email protected])5>                                        G, Acc)
([email protected])5>                           end,
([email protected])5>                           dict:new(),
([email protected])5>                           Gcounts)]
([email protected])5>            end.
#Fun<erl_eval.12.113037538>
([email protected])6> {ok, [R]} = Client:mapred([{<<"groceries">>,
<<"mine">>},
([email protected])6>                               {<<"groceries">>,
<<"yours">>}],
([email protected])6>                              [{map, {qfun, Count},
none, false},
([email protected])6>                               {reduce, {qfun,
Merge}, none, true}]).
** exception error: no match of right hand side value "all nodes failed"

above happened when starting riak with console or plain ./bin/riak start
(riak's erl shell : Erlang R13B04 (erts-5.7.5) [source] [smp:2:2] [rq:2]
[async-threads:0] [hipe] [kernel-poll:false])

also error when using erlang shell (from port : Erlang R13B03 (erts-5.7.4)
[source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [hipe]
[kernel-poll:false]) :
::erl -name [email protected] -setcookie riak -pa
`pwd`/lib/riak-0.9.1.ez/riak-0.9.1/ebin
Erlang R13B03 (erts-5.7.4) [source] [64-bit] [smp:2:2] [rq:2]
[async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7.4  (abort with ^G)
([email protected])1> code:which(riak).
"~/FromFtp/riak/riak-0.9.1/lib/riak-0.9.1.ez/riak-0.9.1/ebin/riak.beam"
([email protected])2> {ok, Client} = riak:client_connect('[email protected]
').
{ok,{riak_client,'[email protected]',<<4,181,78,207>>}}
([email protected])4> Count = fun(G, undefined, none) ->
([email protected])4>              [dict:from_list([{I, 1} || I <-
riak_object:get_value(G)])]
([email protected])4>            end.
#Fun<erl_eval.18.105910772>
([email protected])5> Merge = fun(Gcounts, none) ->
([email protected])5>              [lists:foldl(fun(G, Acc) ->
([email protected])5>                             dict:merge(fun(_, X, Y)
-> X+Y end,
([email protected])5>                                        G, Acc)
([email protected])5>                           end,
([email protected])5>                           dict:new(),
([email protected])5>                           Gcounts)]
([email protected])5>            end.
#Fun<erl_eval.12.113037538>
([email protected])6> {ok, [R]} = Client:mapred([{<<"groceries">>,
<<"mine">>},
([email protected])6>                               {<<"groceries">>,
<<"yours">>}],
([email protected])6>                              [{map, {qfun, Count},
none, false},
([email protected])6>                               {reduce, {qfun,
Merge}, none, true}]).
** exception error: undefined function luke:new_flow/5
     in function  riak_client:mapred_stream/4
     in call from riak_client:mapred/4

i used the default config files so the cookie is also consistant.
new to this so not sure where to get from there.
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to