CorrugatedIron batch get?

Kevin Burton rkevinburton at charter.net
Sun Feb 10 17:28:57 EST 2013


So for [2] what is a RiakObjectID? The name of the argument is bucket-key
pairs? But I am confused what is the constructor that takes an array of
strings that is labeled object id? No relation to RiakBucketKeyInput.

 

I hadn't even known about IRiakBatchClient. Now I am intrigued. From the
source it seems to mimic all of the calls to IRiakClient. How is the setup
different? When does the "batch" start?

 

This is kind of off-topic but I notice that there is a property public int
RetryCount { get; set; }. What is the default value? How does it work? Is
the whole batch retried or individual calls within the batch?

 

From: riak-users [mailto:riak-users-bounces at lists.basho.com] On Behalf Of
Jeremiah Peschka
Sent: Sunday, February 10, 2013 4:05 PM
To: riak-users
Subject: Re: CorrugatedIron batch get?

 

My guess is that you're referring to the method Put(IEnumerable<RiakObject>
values) [1]. If that's the case, yes there's also a Get that accepts an
IEnumerable of RiakObjectID [2]. Riak doesn't support multi-get so CI is
just wrapping a bunch of Gets in the background for you. MapReduce might be
more effective here.

 

If you're talking about the IRiakBatchClient interface [3], all actions of
RiakClient can be handled through IRiakBatchClient. Keep in mind that CI's
batch operations are just a wrapper around making a large number of calls at
once. Nothing about Batch() is atomic - if you need a Unit of Work pattern
you'll have to implement it yourself.

 

[1]:
https://github.com/DistributedNonsense/CorrugatedIron/blob/master/Corrugated
Iron/RiakClient.cs#L306

[2]:
https://github.com/DistributedNonsense/CorrugatedIron/blob/master/Corrugated
Iron/RiakClient.cs#L191

[3]:
https://github.com/DistributedNonsense/CorrugatedIron/blob/master/Corrugated
Iron/IRiakBatchClient.cs




---

Jeremiah Peschka - Founder, Brent Ozar Unlimited

MCITP: SQL Server 2008, MVP

Cloudera Certified Developer for Apache Hadoop

 

On Sun, Feb 10, 2013 at 1:32 PM, Kevin Burton <rkevinburton at charter.net>
wrote:

Looking at the method calls I can see that there is a batch Put. Where I can
form a list of RiakObject s and do one put that writes all of the objects to
the database. Is there an equivalent "batch get"? Examples? Thank you.


_______________________________________________
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/20130210/be024b55/attachment.html>


More information about the riak-users mailing list