Question-: You have batch processing on every midnight which runs for - hours, based on the data volume. And this batch process writes this data in a Cassandra database table. Which of the following Compaction strategy fits for this requirement? A. Leveled compaction B. Size Tiered compaction C. Time window compaction D. Batch window compaction
Answer: B Exp: There are some points which you need to consider while deciding the compaction strategy. 1. If you are using time series data then go for the time window compaction strategy. 2. if your database has more reads than writes, then go for leveled compaction strategy. 3. Access Mostly Uused Products by 50000+ Subscribers 4. If database is populated with batch process then size tier compaction strategic works well. 5. If your database does not have enough disk space then go for the leveled compaction strategy because it requires only 10% head room in addition to the space occupied by data to accomplish the compaction. But for the size tier it requires 50% head room for compaction.
Question-: Which of the following event Trigger the compaction process? A. Compaction happens every time when Memtable flushes to an SSTable. B. Compaction happens when manual flush happens C. Compaction happens during the bootstrap process D. Compaction happens when Memtable or commit log become too large. E. Compaction happens every midnight by default F. Compaction happens with every delete row command issued by a client
Answer: A,B,C,D Exp: Compaction triggers in the following situation:
Question-: Which of the following statements are correct with regards to Tombstones compaction strategy? A. If there are no eligible buckets for size tiered compaction then this may be initiated. B. If there are expired tombstone records are more than 20% then this would be initiated. C. In case of Tombstone compaction largest SSTable would be chosen first. D. SSTable must be at least one week older before it is chosen for Tombstone compaction.
Answer: A, B, C Exp: There is no specific Tombstone compaction strategy but it is a part of size tiered compaction strategy. This would be initiated by default when • There is no eligible buckets from the size tiered compaction then a single SSTable would be considered for compaction. • This would help in eliminating the expired Tombstone records. • If your Tombstone records are more than 20% in SSTable then this compaction would be initiated. • When Tombstone compaction is initiated the largest SSTable would be considered first. • By default, SSTable should be at least one day older before it is considered for Tombstone compaction.