Reputation: 249
I'm changing compaction strategy from size to level? Is there any way to check whether the compaction has changed or not??
Upvotes: 0
Views: 430
Reputation: 12840
You can find compaction info with query :
For Cassandra Version < 3
SELECT compaction_strategy_class,compaction_strategy_options,max_compaction_threshold, min_compaction_threshold FROM system.schema_columnfamilies WHERE keyspace_name = 'your_keyspace_name' AND columnfamily_name = 'your_table_name';
For Cassandra Version >= 3
SELECT compaction FROM system_schema.tables WHERE keyspace_name = 'your_keyspace_name' AND table_name = 'your_table_name' ;
Upvotes: 0
Reputation: 4502
Login to cqlsh and check table structure.
$cqlsh> desc keyspacebname.tablename;
You will see the table compaction class:
CREATE TABLE keyspacebname.tablename (
.....
PRIMARY KEY (..)
) WITH CLUSTERING ORDER BY (... DESC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
...
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
....
You can also check the compaction status via nodetool:
$> nodetool compactionstats
for more details check these links: nodetool compactionstats
Upvotes: 1