incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Moses Dinakaran <mosesdinaka...@gmail.com>
Subject Is it possible to delete records based upon where condition
Date Wed, 12 May 2010 12:34:34 GMT
Hi All,

In Cassandra it possible to remove records based upon where condition.

We are planning to move the session and cache table from MySql to Cassandra
and where doing the fesability study. Everything seems to be Ok other than
garbage collection of session table.

Was not able to  remove super columns from the Key based upon certain
conditions in the column value.

Follows the schema for Session tables


FESession  = {
    sessions : {
    1001 : {
    ses_name       : "user",
    ses_userid      :  258,
    ses_tstamp    : “1273504587”
    },
    1002 : {
    ses_name    : "user",
    ses_userid    :  259,
    ses_tstamp    : “1273504597”
    },
    },
}

I wanted to remove the records based upon the value of the column ses_tstamp
ie (delete from sessions where ses_tstamp between XXX & YYY OR delete from
session where ses_tstamp < XXX )

Is it possible to achieve this in Cassandra If so  please let me know how.

To my knowledge I dont see any kind of where condition in Casandra,
If that is the case also please let me know the other ways like
restructuring the Schema or whatever...

Regards
Moses

Mime
View raw message