0
votes

I am using CQLSSTableWriter to write sstables in an offline/bulk mode. The order is not enforced during the write operation. Is it possible to enforce a compaction before I use sstableloader to load data into cassandra cluster?

2

2 Answers

1
votes

SStables are immutable in nature, also sstable is not just a file but its having data with metadata. Meta data includes index.db etc. check datastax docs for more details.

so we should not do manually as the token range in each sstable will change during the compaction and the resultant sstable will not be having data evenly distributed. Also compaction will leads to larger sstable and the node which will be having that sstable will become the hotspot.

it will be better/recommended not to do it manually.

0
votes

You can drain the node via nodetool drain and then safely continue your compactions.