Thanks, that's helpful. Now I need to figure out if / how this is surfaced in 
the Java 1.1.1 client (I don't seem to see it anywhere, but maybe I'm missing 
something).



________________________________
 From: Jeremiah Peschka <jeremiah.pesc...@gmail.com>
To: "riak-users@lists.basho.com" <riak-users@lists.basho.com> 
Sent: Wednesday, July 10, 2013 8:50 PM
Subject: Re: New Counters - client support
 


If a counter doesn't exist, it's created when you increment/decrement the 
counter. Otherwise it returns your API's equivalent of "nothing to see".

So, in CorrugatedIron, you'd call RiakClient.IncrementCounter("bucket", 
"counter", 1);

After that command completes, the counter has a value of 1; assuming no other 
increments are made.

To initialize to a different value, simply increment/decrement the counter to 
the chosen value and begin from there.

--
Jeremiah Peschka - Founder, Brent Ozar Unlimited
MCITP: SQL Server 2008, MVP
Cloudera Certified Developer for Apache Hadoop

On Jul 10, 2013, at 8:00 PM, Y N <yug...@yahoo.com> wrote:


Hi,
>
>
>
>The counters stuff looks awesome.... can't wait to use it.
>
>
>Is this already supported via the currently available clients (specifically, 
>the Java 1.1.1 client)? 
>
>
>Also, when can we expect some tutorial / documentation around using counters? 
>I looked at the GitHub link, however, some use cases are not very clear (e.g. 
>are all counters automatically initialized to 0? How do you initialize it to a 
>different value)?
>
>
>Thanks.
>
>
>
>
_______________________________________________
>riak-users mailing list
>riak-users@lists.basho.com
>http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to