Sometimes you'll want to compact specific sstables and you won't want to major compact. You may not have the ability to run jconsole and want to use a command-line tool. There's a ticket (CASSANDRA-10660) to be able to do this with nodetool, but in the meantime, you can use something like jmxsh (or my mirror for when google pulls the plug on google code).
The jmx mbean to do user defined compaction is in the org.apache.cassandra.db
package in the CompactionExecutor
and the method is called forceUserDefinedCompaction
. You'll need to get a list of sstables that you want to compact.
Start jmxsh with java -jar jmxsh-R5.jar -h localhost -p 7199
:
jeremy$ java -jar jmxsh-R5.jar -h localhost -p 7199
jmxsh v1.0, Tue Jan 22 10:23:12 CST 2008