Best way to insert a collection of items at once

Deyan Dyankov dyankov at
Mon Jul 22 12:11:14 EDT 2013


I am not familiar with the java api but in my opinion you should not compromise on the quorums in order to gain speed, at least not in this case.
Looping through each item is the collection is slow but you can divide the collection in 10 chunks (for example) and loop them using 10 different threads.
This is what I do when I need to migrate data into riak. The migration executes faster and riak handles it very well.

best regards,

On Jul 22, 2013, at 6:57 PM, rsb <cnasillo at> wrote:

> Hi All, new Riak'er here so please bear with me.
> I have a cluster of 5 nodes, and I have created a cluster-PCB client using
> the RiakFactory. My question is the following;
> Given a collection of 10,000 items, what is the fastest way of inserting
> such items. I have tried the following techniques using the Java API 1.1.0.
> - Looping through each item in the collection and performing a
>, val).execute()
> - I have also tried using StoreObject<TypeX> with defaults and specifying
> 'lazy' quorums
>     * I have read StoreObject does a read on every write, if true, can that
> be disabled?
> Thanks in advance!
> --
> View this message in context:
> Sent from the Riak Users mailing list archive at
> _______________________________________________
> riak-users mailing list
> riak-users at

More information about the riak-users mailing list