New Counters - client support
jeremiah.peschka at gmail.com
Wed Jul 10 23:50:46 EDT 2013
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 <yug3sh at yahoo.com> wrote:
> 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)?
> riak-users mailing list
> riak-users at lists.basho.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users