incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrik Modesto <patrik.mode...@gmail.com>
Subject Removing a counter columns using Thrift interface
Date Mon, 25 Jun 2012 07:06:20 GMT
Hi,

I was playing with Counters in Cassandra 1.0.10 and I see a behaviour
that I didn't expect. It's about removing a Counter column.

I'm used to use Mutation for everything, so the first thing I tried
was Deletion on Counter column. Well, nothing happened. No error and
the Counter column was still there.

The second try was the remove_counter() method. When I set just the
column_family of ColumnPath, nothing happened. No error and the
Counter column was still there. I supposed it would work like the
remove() method which would remove whole row.

The third try was the remove_counter() method with fully specified
Counter column in ColumnPath. Now the Counter column was gone.

Maybe it behaves differenrtly in 1.1.x version but I'd expect working
Deletion() on Counter column or error and remove_counter() to work
like remove().

Why did I try to remove a Counter column? Because I need to reset the
counter to zero before computing something and I don't know other way.
 Suppose I have thousands of countes I need to reset and I don't want
to read every Counter column I need to reset and then to all of them
write their negative value.

Regards,
Patrik

Mime
View raw message