error running Erlang m/r job

Tom Zeng tom at intridea.com
Thu Apr 4 10:07:47 EDT 2013


Hi everyone,

I am trying to run the Erlang m/r following the Riak Handbook, and got the
following error:

(riak at 127.0.0.1)4> ExtractTweet = fun(RObject, _, _) ->
(riak at 127.0.0.1)4>  {struct, Obj} = mochijson2:decode(
(riak at 127.0.0.1)4>    riak_object:get_value(RObject)),
(riak at 127.0.0.1)4>  [proplists:get_value(<<"tweet">>, Obj)]
(riak at 127.0.0.1)4> end.
#Fun<erl_eval.18.82930912>
(riak at 127.0.0.1)5> C:mapred([{<<"tweets">>, <<"41399579391950848">>}],
(riak at 127.0.0.1)5>   [{map, {qfun, ExtractTweet}, none, true}]).
** exception error: undefined function riak_client:mapred/3

I've been using JavaScript for m/r and just started using Erlang per Basho
engineers' recommendation at Riak DC meetup. Any help/pointers appreciated.

Thanks
Tom
-- 
Tom Zeng
Director of Engineering
Intridea, Inc. | www.intridea.com
tom at intridea.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20130404/8668e4e9/attachment.html>


More information about the riak-users mailing list