Copying counters from cluster A to B using Java client.
guido.medina at temetra.com
Wed Jan 29 06:27:05 EST 2014
We are using Riak Java client 1.4.x and we want to copy all counters
from cluster A to cluster B (all counters will be stored on a single to
very few buckets), if I list the keys using special 2i bucket index and
then treat each key as IRiakObject, will that be enough to copy
counters, or will counter siblings stop me from doing that? Since at
Riak Java client CounterObject is not an IRiakObject, it is instead an
Comments at a working method:
*Source bucket:* Bucket from Riak client pointing to source cluster.
*Dest bucket:* Bucket from Riak client pointing to dest bucket.
protected void copyOneItem(final Bucket sourceBucket, final Bucket
destBucket, final String key) throws RiakRetryFailedException
final IRiakObject riakObject=sourceBucket.fetch(key).execute();
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users