GET vs map reduce

Jacques whshub at gmail.com
Thu Aug 18 16:45:05 EDT 2011


Fyi, when I did something similar, I found that running separate parallel
get requests was substantially faster than a basic map reduce.  That was
even the case when I ran the map reduce as an erlang function instead of
javascript.

You should be able to find my previous post at the end of java client
discussion thread from a couple months back.  I can't remember the
difference but I think it may have been something like 100ms overhead to run
a map reduce versus parallel gets.

Jacques

On Thu, Aug 18, 2011 at 1:35 PM, Wilson MacGyver <wmacgyver at gmail.com>wrote:

> Hi,
>
> I've been using map reduce to fake a bulk get.
>
> I do a post against map reduce interface, using the following
>
> {"inputs":
> [["bucket1", "k1"],
> ["bucket1", "k2"],
> ["bucket1", "k3"],
> ["bucket1", "k4"],
> ["bucket1", "k5"],
> ["bucket1", "k6"],
> ["bucket1", "k7"],
> ["bucket1", "k8"],
> ["bucket1", "k9"]
> ],
> "query":[{"map":{"language":"javascript","source":"function(v) { return
> [v.key,v
> .values[0].data]; }"}}]}
>
>
> as you can see, it's very straight forward, I'm just passing the list
> of buckets and keys, and
> then return them.
>
> I also set the R to 1.
>
> it's been working fine. but lately, as traffic begin to increase, we
> started seeing time out errors
> on the map reduce call. the strange thing is, if I issue GET on each
> key, results are coming back
> without any problem.
>
> are there any subtle differences between GET vs map reduce that I'm
> not understanding?
>
> Thanks,
>
> --
> Omnem crede diem tibi diluxisse supremum.
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110818/93e1e64b/attachment.html>


More information about the riak-users mailing list