Database Reference
In-Depth Information
NOTE
Because major compaction is a complex and sensitive operation, it's a good idea to run it only infre-
quently (not every day) and during low-traffic periods.
Flush
Data is stored in a memtable. To force a write of the data from the memtable to the SSTable on
the filesystem, you can use the flush command on Nodetool, like this:
bin/nodetool flush -h 192.168.1.1 -p 9160
If you check the server logs, you'll see output similar to this:
DEBUG 15:16:33,945 Forcing binary flush on keyspace Keyspace1, CF Standard2
DEBUG 15:16:33,945 Forcing flush on keyspace Keyspace1, CF Standard2
INFO 15:16:33,945 Standard2 has reached its threshold;
switching in a fresh Memtable at
CommitLogContext(file='/var/lib/cassandra/commitlog/CommitLog-1277663698134.log',
position=1390)
//etc
INFO 15:16:34,104 Completed flushing /var/lib/cassandra/data/Keyspace1/
Standard2-3-Data.db
Cleanup
Say that you've had a cluster running for some time, and you want to change the replication
factor or the replication strategy. That's possible, but with two caveats. First, these are not inten-
ded to be performed on a live cluster, and therefore will likely require you to bring nodes down
and then back up, even if you've reloaded the configuration dynamically. Second, you will want
to run a Nodetool cleanup afterward to make sure that everything is OK.
You can execute Nodetool with the cleanup argument and the node you want to clean:
$ bin/nodetool cleanup -h 192.168.1.7
This will execute and then immediately return control to the terminal. Essentially this will run an
anti-compaction on the specified node.
Search WWH ::




Custom Search