Answers inline.

On Fri, Nov 4, 2011 at 4:59 PM, Vlad Paiu <vladp...@opensips.org> wrote:

> Hello,
>
> I'm a new user of Cassandra and I think it's great.
> Still, while developing my APP using Cassandra, I got stuck with some
> things and I'm not really sure that Cassandra can handle them at the moment.
>
> So, first of all, does Cassandra allow for Counters and regular Keys to be
> located in the same ColumnFamily ?
>
What do you mean when you say "regular Keys"? If you are hinting at columns
apart from counters, then the answer is *no*: only counters can exist in a
CounterColumnFamily and other column families cannot hold counters.


>
> Secondly, is there any way to dynamically set the TTL for a key ? In the
> sense that I have a key, I initially set it with no TTL, but after a while
> I decide that it should expire in 100 seconds. Can Cassandra do this ?
>
TTL is not for one key, it is for one column.


>
> 3. Can counters have a TTL ?
>
No. Currently, counters do not (or if I am correct - cannot) have TTL.

>
> 4. Is there any way to atomically reset a counter ? I read on the website
> that the only way to do it is read the variable value, and then set it to
> -value, which seems rather bogus to me.
>
I think that is the only way to reset a counter. I would like to know if
there is another way.

Background: I am using Cassandra since the past two months. Hope the
community corrects me if I am wrong.


>
> Regards,
>
> --
> Vlad Paiu
> OpenSIPS Developer
>
>


-- 
Regards
Amit S. Chavan

Reply via email to