Re: Hector counter question

2012-03-20 Thread Tamar Fraenkel
Thanks.
But the increment is thread safe right? if I have two threads trying to
increment a counter, then they won't step on each other toe?


*Tamar Fraenkel *
Senior Software Engineer, TOK Media

[image: Inline image 1]

ta...@tok-media.com
Tel:   +972 2 6409736
Mob:  +972 54 8356490
Fax:   +972 2 5612956





On Mon, Mar 19, 2012 at 9:05 PM, Jeremiah Jordan 
jeremiah.jor...@morningstar.com wrote:

  No,
 Cassandra doesn't support atomic counters.  IIRC it is on the list of
 things for 1.2.

 -Jeremiah

  --
 *From:* Tamar Fraenkel [ta...@tok-media.com]
 *Sent:* Monday, March 19, 2012 1:26 PM
 *To:* cassandra-u...@incubator.apache.org
 *Subject:* Hector counter question

   Hi!

  Is there a way to read and increment counter column atomically,
 something like incrementAndGet (Hector)?

  Thanks,

  *Tamar Fraenkel *
 Senior Software Engineer, TOK Media

 [image: Inline image 1]

 ta...@tok-media.com
 Tel:   +972 2 6409736
 Mob:  +972 54 8356490
 Fax:   +972 2 5612956




tokLogo.pngtokLogo.png

Re: Hector counter question

2012-03-20 Thread Richard Low
On 20 March 2012 06:51, Tamar Fraenkel ta...@tok-media.com wrote:

 But the increment is thread safe right? if I have two threads trying to 
 increment a counter, then they won't step on each other toe?

That's right - you can have many threads incrementing the same counter
and it's safe.  But reading and incrementing is unsafe.

Richard.

--
Richard Low
Acunu | http://www.acunu.com | @acunu


Hector counter question

2012-03-19 Thread Tamar Fraenkel
Hi!

Is there a way to read and increment counter column atomically, something
like incrementAndGet (Hector)?

Thanks,

*Tamar Fraenkel *
Senior Software Engineer, TOK Media

[image: Inline image 1]

ta...@tok-media.com
Tel:   +972 2 6409736
Mob:  +972 54 8356490
Fax:   +972 2 5612956
tokLogo.png

RE: Hector counter question

2012-03-19 Thread Jeremiah Jordan
No,
Cassandra doesn't support atomic counters.  IIRC it is on the list of things 
for 1.2.

-Jeremiah


From: Tamar Fraenkel [ta...@tok-media.com]
Sent: Monday, March 19, 2012 1:26 PM
To: cassandra-u...@incubator.apache.org
Subject: Hector counter question

Hi!

Is there a way to read and increment counter column atomically, something like 
incrementAndGet (Hector)?

Thanks,

Tamar Fraenkel
Senior Software Engineer, TOK Media

[Inline image 1]

ta...@tok-media.commailto:ta...@tok-media.com
Tel:   +972 2 6409736
Mob:  +972 54 8356490
Fax:   +972 2 5612956



inline: tokLogo.png