Thank you for your time! I have solved the issue. I had the R14 and Riak 1.0.0 in the ring. Everything works fine after I installed latest version from git master.
Regards, Boris From: [email protected] [mailto:[email protected]] On Behalf Of Ilyushonak Barys Sent: Monday, July 09, 2012 3:41 PM To: 'Sean Cribbs' Cc: [email protected] Subject: RE: mapred with erlang and mapred_funterm() as strfun Sean, thank you for note about production. The value of allow_strfun is set to true on all mine Riak nodes and client application. Is there any possibility to use Riak mapred as Erlang functions without copying source code to all nodes? Regards, Boris From: Sean Cribbs [mailto:[email protected]] Sent: Monday, July 09, 2012 3:32 PM To: Ilyushonak Barys Cc: [email protected] Subject: Re: mapred with erlang and mapred_funterm() as strfun Hello Boris, We do not advise using the strfun functionality in production, for obvious security and stability reasons. That said, you can enable it on all of your nodes by adding this setting to the 'riak_kv' section of your app.config file: {allow_strfun, true} Cheers, On Mon, Jul 9, 2012 at 6:41 AM, Ilyushonak Barys <[email protected]<mailto:[email protected]>> wrote: Hello, Could you please shed light on howto use strfun type in mapred query? As I see, strfun was introduces as a solution for inability to use anonymous functions in Erlang mapred syntax (http://lists.basho.com/pipermail/riak-users_lists.basho.com/2010-September/001918.html). I have tried the following code: {ok, C} = riak:client_connect('[email protected]<mailto:[email protected]>'). MapFun = "fun(Input, undefined, none) -> [{BinData, ObjStatus} || {BinData, ObjStatus} <- [riak_object:get_value(Input)], ObjStatus == 1] end.". C:mapred(<<"test_bucket">>, [{map, {strfun, MapFun}, none, true}]). But with no luck. I got on Riak cluster: [error] gen_fsm <0.30923.28> in state executing terminated with reason: {error,{error,{badfun,#Fun<erl_eval.18.82930912>},[{riak_kv_mapper,run_map,9},{riak_kv_mapper,'-do_map/2-fun-0-',9},{lists,foldl,3},{riak_kv_mapper,do_map,2},{gen_fsm,handle_msg,7},{proc_lib,init_p_do_apply,3}]}} [error] CRASH REPORT Process <0.30923.28> with 0 neighbours crashed with reason: {error,{error,{badfun,#Fun<erl_eval.18.82930912>},[{riak_kv_mapper,run_map,9},{riak_kv_mapper,'-do_map/2-fun-0-',9},{lists,foldl,3},{riak_kv_mapper,do_map,2},{gen_fsm,handle_msg,7},{proc_lib,init_p_do_apply,3}]}} [error] Supervisor luke_phase_sup had child undefined started with {luke_phase,start_link,undefined} at <0.30923.28> exit with reason {error,{error,{badfun,#Fun<erl_eval.18.82930912>},[{riak_kv_mapper,run_map,9},{riak_kv_mapper,'-do_map/2-fun-0-',9},{lists,foldl,3},{riak_kv_mapper,do_map,2},{gen_fsm,handle_msg,7},{proc_lib,init_p_do_apply,3}]}} in context child_terminated Please, advice. PS. I use 3 node cluster, and my client runs on separate machine. I have tried the code above with local_client on riak node and it works well. Regards, Boris _______________________________________________________ The information contained in this message may be privileged and conf idential and protected from disclosure. If you are not the original intended recipient, you are hereby notified that any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon, this information is prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. Thank you for your cooperation. Troika Dialog, Russia. If you need assistance please contact our Contact Center (+7495) 258 0500<tel:%28%2B7495%29%20258%200500> or go to www.troika.ru/eng/Contacts/system.wbp<http://www.troika.ru/eng/Contacts/system.wbp> _______________________________________________ riak-users mailing list [email protected]<mailto:[email protected]> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com -- Sean Cribbs <[email protected]<mailto:[email protected]>> Software Engineer Basho Technologies, Inc. http://basho.com/ _______________________________________________________ The information contained in this message may be privileged and conf idential and protected from disclosure. If you are not the original intended recipient, you are hereby notified that any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon, this information is prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. Thank you for your cooperation. Troika Dialog, Russia. If you need assistance please contact our Contact Center (+7495) 258 0500 or go to www.troika.ru/eng/Contacts/system.wbp
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
