That sounds about right for changing the CF type, you'll need to drop the existing CF first.
You should be able to drop the existing CF from the nodes as a rolling change and and add the new super CF as a rolling change as well. Or if you can shutdown, shutdown and delete the existing CF, restart and check everything is OK, then shutdown and add the new CF.
If you have enough space you could add the new super CF, copy the data from the old CF to the new CF, then only delete the old CF when you are successful. This would give you an easier rollback mechanism.
FWIW you are not able to change a CF type in 0.7* , so you are not missing out on too much.
On 14 Oct, 2010,at 08:15 AM, Jean-Yves LEBLEU <email@example.com> wrote:
Thank you for your comments.
You are right we are running 06.4, and we are changing column family type to supercolumn.
So the idea is to export data, stop all the nodes in the ring, remove data files, restart all nodes with the new storage-conf and reimport data.
On Wed, Oct 13, 2010 at 2:07 PM, aaron morton <firstname.lastname@example.org>
I've always assumed that when the drain command logs that the node is drained the commit log is clear. The drain command stops the node from accepting requests, flushes the memtables to disk and finally marks the commit logs as safe to delete. As far as I can tell, it should either work or fail.
If a second of the log cannot be discard the command will log at debug level "Not safe to delete commit log...". But AFAIK once the memtables are flushed and more more writes accepted you are good to go.
If you are dropping CF's then you should be able to deploy the code to stop querying them and then do a rolling change in the cluster. If you are renaming then it may be a bit trickier.
Shutting down with kill -9 is the approved way to stop cassandra.
Also, am assuming you are on 0.6*.
Hope that helps
On 13 Oct 2010, at 21:00, Jean-Yves LEBLEU wrote:
When I look at the wiki the procedure to change the column family is :
Empty the commitlog with "nodetool drain."
- Shutdown Cassandra and verify that there is no remaining data in the commitlog.
the sstable files (-Data.db, -Index.db, and -Filter.db) for any CFs
removed, and rename the files for any CFs that were renamed.
- Make necessary changes to your storage-conf.xml.
- Start Cassandra back up and your edits should take effect.
How do we check that the commitlog is empty ? as it seems that there are still files in the commit log directory after a drain ?
Is it necessary to shutdown all nodes in a ring before changing the storage-conf.xml files ?
On linux is a "kill -9" acceptable as a cassandra shutdown ?
Thanks for answer.