Best way to insert a collection of items at once

Brian Roach roach at basho.com
Mon Jul 22 15:19:25 EDT 2013


Re your last Q:

>  I have read StoreObject does a read on every write, if true, can that
be disabled?

Yes. If you're not worried about creating siblings you can use the
withoutFetch() option in the StoreObject:

storeObject.withoutFetch().execute();

The StoreObject will not attempt to fetch the existing value (nor do
conflict resolution) when that's specified.

Also worth asking is how/when are you constructing your Bucket object?
By default the Java client does a fetch for bucket properties when you
call IRiakClient.fetchBucket(bucketName).execute()

This can be disabled by using:

Bucket b = client.fetchBucket(bucketName).lazyLoadBucketProperties().execute();

Thanks!
- Roach

On Mon, Jul 22, 2013 at 12:41 PM, rsb <cnasillo at gmail.com> wrote:
> Thank you for your reply, I gave that a shot and worked really well.
>
>
>
> --
> View this message in context: http://riak-users.197444.n3.nabble.com/Best-way-to-insert-a-collection-of-items-at-once-tp4028487p4028500.html
> Sent from the Riak Users mailing list archive at Nabble.com.
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com




More information about the riak-users mailing list