You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Suruchi Deodhar <su...@generalsentiment.com> on 2013/11/01 16:15:42 UTC

Cassandra remove column using thrift

Hello folks,

I have a couple of questions regarding deletion of columns from Cassandra
using thrift.
I am trying to remove a column using the thrift API call - remove() defined
as below.

void remove(1:required binary key,
              2:required ColumnPath column_path,
              3:required i64 timestamp,
              4:ConsistencyLevel consistency_level=ConsistencyLevel.ONE)
       throws (1:InvalidRequestException ire, 2:UnavailableException ue,
3:TimedOutException te),

I provide the timestamp as the current time and
consistency_level=ConsistencyLevel.ALL.

My questions wrt this are:
1. Is there a log where I can check whether the remove command registered
successfully with the Cassandra nodes?
(In my case, the thrift call was successfully executed but my queries still
show data in the deleted column. I don't see logs in the system.log. )

2. Given that consistency_level=ConsistencyLevel.ALL, how much time does
cassandra take to commit the delete and cassandra client to get updated
data?

Thanks,
Suruchi

Re: Cassandra remove column using thrift

Posted by Jayadev Jayaraman <jd...@gmail.com>.
Hey guys,

False alarm, sorry about that. Our column-names are byte-concatenations of
short integers and we had been constructing the column names wrongly before
attempting a delete. We fixed the problem and we've been able to delete the
columns without issue.


On Fri, Nov 1, 2013 at 4:19 PM, Robert Coli <rc...@eventbrite.com> wrote:

> On Fri, Nov 1, 2013 at 8:15 AM, Suruchi Deodhar <
> suruchi.deodhar@generalsentiment.com> wrote:
>
>> I provide the timestamp as the current time and
>> consistency_level=ConsistencyLevel.ALL.
>>
>> My questions wrt this are:
>> 1. Is there a log where I can check whether the remove command registered
>> successfully with the Cassandra nodes?
>> (In my case, the thrift call was successfully executed but my queries
>> still show data in the deleted column. I don't see logs in the system.log. )
>>
>
> This sounds unexpected. Have you tried deleting the same column via
> cassandra-cli or cqlsh (as applicable)? If so, does it work?
>
>
>> 2. Given that consistency_level=ConsistencyLevel.ALL, how much time does
>> cassandra take to commit the delete and cassandra client to get updated
>> data?
>>
>
> In my understanding, zero time. CL.ALL means all replicas have
> acknowledged the write, and therefore the write should be available in the
> memtables of all nodes.
>
> =Rob
>

Re: Cassandra remove column using thrift

Posted by Robert Coli <rc...@eventbrite.com>.
On Fri, Nov 1, 2013 at 8:15 AM, Suruchi Deodhar <
suruchi.deodhar@generalsentiment.com> wrote:

> I provide the timestamp as the current time and
> consistency_level=ConsistencyLevel.ALL.
>
> My questions wrt this are:
> 1. Is there a log where I can check whether the remove command registered
> successfully with the Cassandra nodes?
> (In my case, the thrift call was successfully executed but my queries
> still show data in the deleted column. I don't see logs in the system.log. )
>

This sounds unexpected. Have you tried deleting the same column via
cassandra-cli or cqlsh (as applicable)? If so, does it work?


> 2. Given that consistency_level=ConsistencyLevel.ALL, how much time does
> cassandra take to commit the delete and cassandra client to get updated
> data?
>

In my understanding, zero time. CL.ALL means all replicas have acknowledged
the write, and therefore the write should be available in the memtables of
all nodes.

=Rob