cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Hiramoto <k...@hiramoto.org>
Subject rename column family
Date Thu, 10 Feb 2011 20:56:13 GMT
Hi,

In Mysql I do this pattern and wonder if I could do something similar
with cassandra.

1.   Live/Production queries always coming into LiveTable
2.   Build new data with BuildTable
3.    RENAME TABLE  LiveTable TO OldTable, BuildTable To LiveTable
4.   DROP TABLE OldTable,   Goto step #2 building new data set.

Since the RENAME TABLE is an atomic operation and takes only a few ms
on  a 20GB table, The queries on LiveTable are never interrupted.  The
only way i see to so this, with cassandra would be to use ColumnFamily1
and ColumnFamily2   and switch reads between ColumnFamily1 and
ColumnFamily2 depending on which is building, and which is live.  
Before i start building a new dataset I would have to delete all the data.

I use cassandra TTLs for a different project,  but it wouldn't really
suit this usage model.

Any good way to do this in cassandra?

Thanks.

Karl

Mime
View raw message