Database Reference
In-Depth Information
'tombstone_compaction_interval':43200,
'tombstone_threshold': 0.1
};
As you can see in the preceding code snippet, we have specified some other properties
that are related to compaction in the query. Cassandra provides a very detailed configura-
tion parameter to tweak the way you want the compaction process to take place. Here's the
list of properties that you can specify within the JSON object for the COMPACTION
keyword:
enabled : This takes a Boolean value. This property tells Cassandra to enable or
disable compaction on the particular table. You would probably never want to dis-
able it, so likely you are not going to use it.
tombstone_threshold : This is the ratio of cells (columns) in an SSTable
that are eligible for deletion (garbage collectable) to the total number of columns
in the SSTable. Essentially, it is the percentage of discarded columns in the SST-
able expressed in decimal. By default, when 20 percent of SSTable columns be-
come garbage collectable, it becomes a candidate for tomb-
stone_compaction .
tombstone_compaction_interval : This is the minimum amount of wait
time (in seconds) before the SSTable is considered for tombstone compaction. If
tombstone_threshold is reached, the SSTable is compacted; otherwise,
Cassandra retries again after tombstone_compaction_interval . So, it
may not be wise to set this value too small. The default is 86400 seconds (one
day).
unchecked_tombstone_compaction : If the data from the partition that
the tombstone belongs to exists in other data files, the tombstone cannot be dis-
carded; it works as an indicator of deletion. This check is performed every time
before a tombstone compaction is attempted. This is extra work and is exactly
why you would not want to keep tombstone_compaction_interval too
low. By setting this option as true , you are telling Cassandra to try to compact
without performing this check. Compaction may fail in this case, but if you have
a situation where you have immutable rows that get discarded as a whole, you
may opt for this option.
min_sstable_size (specific to SizeTieredCompactionStrategy ):
This defines SSTables of similar sizes into one big SSTable. So, one can think of
the compaction process as bucketed or batch process where SSTables that fall into
one bucket get merged into one. If your SSTables are really small, you may end
Search WWH ::




Custom Search