Facing exception error in riak-erlang client in erlang shell while doing Mapreduce

Gopi Krishna gopi at lintelindia.com
Sat May 17 10:04:35 EDT 2014


Hi,

I am getting the following , don't know what was happening could you please
elaborate and explain the solution to this.

I am working on erlang-riak-client.


1> {ok, Pid} = riakc_pb_socket:start_link('127.0.0.1',10017).
{ok,<0.34.0>}
2>
2>
2> Object = riakc_obj:new(<<"test_age">>, <<"test1">>, <<"gopi & 1">>).
{riakc_obj,<<"test_age">>,<<"test1">>,undefined,[],
           undefined,<<"gopi & 1">>}
3>
3>
3> riakc_pb_socket:put(Pid,Object).
ok
4>
4> Mapf = fun(Obj,_,_) -> [{I,1}|| I <-
binary_to_term(riak_object:get_value(Object))] end.
#Fun<erl_eval.18.82930912>
5> {ok, [{0,[R]}]} =
riakc_pb_socket:mapred(Pid,<<"test_age">>,[{map,{qfun,Mapf},none,true}])
5> .
** exception error: no match of right hand side value
{error,<<"{\"phase\":0,\"error\":\"function_clause\",\"input\":\"{ok,{r_object,<<\\\"test_age\\\">>,<<\\\"test1\\\">>,[{r_content,{dict"...>>}

Please,explain where i have done wrong and  what should i write in order to
get the result for test1 key.
-- 

Thanks & Regards,
J.Gopi Krishna
+91-8341452934,
www.lintelindia.com
Lintel Technologies Pvt. LTD,Hyderabad.

This message contains confidential information and is intended for
recipient. If you are not the intended recipient you are notified that
disclosing, copying, distributing or taking any action in reliance on the
contents of this information is strictly prohibited. E-mail transmission
cannot be guaranteed to be secure or error-free as information could be
intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
contain viruses. The sender therefore does not accept liability for any
errors or omissions in the contents of this message, which arise as a
result of e-mail transmission. If verification is required please request a
hard-copy version.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20140517/c93e2cd1/attachment.html>


More information about the riak-users mailing list