A friend and I hacked up this template for editing queries. It is only a rough prototype, but it would be pretty easy to fold it in to something that would allow you to save the query in an MR bucket or even post it directly:
https://svn.mozilla.org/metrics/testpilot/riak/mapreduce/validate_mapreduce_json.html

On 9/8/10 5:23 AM, Sean Cribbs wrote:
Bryan,

That should only be an issue if you are putting the source of the function 
directly in your query.  Instead, try saving the function in a bucket/key and 
refer to it that way. Here's what a phase using bucket/key instead of source 
would look like:

{"map":{"language":"javascript","bucket":"customMR","key":"extractSomeFields","keep":false}}

You can use curl or any one of the the language-specific clients to store the function, 
just specify "application/javascript" as the content-type.

I use this technique in the "yakriak" demo app: 
http://github.com/seancribbs/yakriak

Sean Cribbs<s...@basho.com>
Developer Advocate
Basho Technologies, Inc.
http://basho.com/

On Sep 8, 2010, at 4:44 AM, Bryan Berry wrote:

hey riak buddies, I find that I have to write my mapreduce functions in one 
single line w/out tabs or line breaks.
Is there an easier way to do it? This makes my code pretty unreadable.

I am using emacs btw, w/ js2-mode
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to