I am slow, you already answered yourself.

Hi,
Yes. If you look in the log on the Riak node you well see that the env around 
your Fun is the module that contains it (even though it is an anon fun, this is 
weird to a JavaScript programer) so if the module changes you will need to 
reload it on the riak nodes. If you need highly dynamic, oft changing M/R fun 
it might be best to use JavaScript. If it is just because you are in dev then 
use that gist to propagate your code changes (maybe hook it into a reloader 
type module 
(http://code.google.com/p/mochiweb/source/browse/trunk/src/reloader.erl)).

There is a thread about this on the trapexit forum here 
http://www.trapexit.org/forum/viewtopic.php?p=53520

Cheers

Russell


On 22 Apr 2010, at 19:35, Abeming Sf wrote:

> Hi Russel,
> 
> Thank you for the link.
> 
> After recompile mapred module, do we need to add it again to riak node?I 
> still got the same error "all nodes failed" when execute m/r from that module.
> 
> Regards,
> Abe
> 
> On 23 April 2010 01:45, Russell Brown <[email protected]> wrote:
> Hi,
> Have a look at this thread
> 
> http://lists.basho.com/pipermail/riak-users_lists.basho.com/2010-April/000830.html
> 
> The issue is that the code needs to be on the riak node. I use the gist here 
> http://gist.github.com/351659 from that thread in development to make sure my 
> M/R funs are available.
> 
> HTH
> 
> Russell
> On 22 Apr 2010, at 18:08, Abeming Sf wrote:
> 
>> Hi,
>> 
>> I encounter the same problem with this guy 
>> http://lists.basho.com/pipermail/riak-users_lists.basho.com/2010-March/000809.html
>>  where I able to use qfun as fun term in riak/erlang console but failed when 
>> execute it from erlang module. It always returning "all nodes failed" error. 
>> Fyi, I able to use jsanon/jsfun as fun term and execute it from erlang 
>> module.
>> 
>> There is a workaround 
>> http://lists.basho.com/pipermail/riak-users_lists.basho.com/2010-March/000810.html.
>> 
>> Instead of using jsanon/jsfun and modfun as workaround, is there any 
>> solution if I still want to use qfun?
>> 
>> Regards,
>> Abe
>> _______________________________________________
>> riak-users mailing list
>> 
>> [email protected]
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> 
> 

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to