com.datastax.driver.core.schemabuilder

## Class TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions

• Enclosing class:
TableOptions.CompactionOptions<T extends TableOptions.CompactionOptions>

public static class TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions
extends TableOptions.CompactionOptions<TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions>
Compaction options specific to SizeTiered strategy

• ### Nested classes/interfaces inherited from class com.datastax.driver.core.schemabuilder.TableOptions.CompactionOptions

TableOptions.CompactionOptions.DateTieredCompactionStrategyOptions, TableOptions.CompactionOptions.LeveledCompactionStrategyOptions, TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions, TableOptions.CompactionOptions.Strategy
• ### Method Summary

All Methods
Modifier and Type Method and Description
TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions bucketHigh(Double bucketHigh)
Size-tiered compaction strategy (STCS) considers SSTables to be within the same bucket if the SSTable size diverges by 50% or less from the default bucket_low and default bucket_high values: [average-size × bucket_low, average-size × bucket_high].
TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions bucketLow(Double bucketLow)
Size-tiered compaction strategy (STCS) considers SSTables to be within the same bucket if the SSTable size diverges by 50% or less from the default bucket_low and default bucket_high values: [average-size × bucket_low, average-size × bucket_high].
String build()
TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions coldReadsRatioToOmit(Double coldReadsRatio)
The maximum percentage of reads/sec that ignored SSTables may account for.
TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions maxThreshold(Integer maxThreshold)
Sets the maximum number of SSTables to allow in a minor compaction.
TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions minSSTableSizeInBytes(Long minSSTableSize)
The SizeTieredCompactionStrategy groups SSTables for compaction into buckets.
TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions minThreshold(Integer minThreshold)
Sets the minimum number of SSTables to trigger a minor compaction

If no call is made to this method, the default value set by Cassandra is 4.

• ### Methods inherited from class com.datastax.driver.core.schemabuilder.TableOptions.CompactionOptions

enabled, freeformOption, tombstoneCompactionIntervalInDay, tombstoneThreshold, uncheckedTombstoneCompaction
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Method Detail

• #### bucketHigh

public TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions bucketHigh(Double bucketHigh)
Size-tiered compaction strategy (STCS) considers SSTables to be within the same bucket if the SSTable size diverges by 50% or less from the default bucket_low and default bucket_high values: [average-size × bucket_low, average-size × bucket_high].

If no call is made to this method, the default value set by Cassandra is 1.5.

Parameters:
bucketHigh - the new value.
Returns:
this object (for call chaining).
• #### bucketLow

public TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions bucketLow(Double bucketLow)
Size-tiered compaction strategy (STCS) considers SSTables to be within the same bucket if the SSTable size diverges by 50% or less from the default bucket_low and default bucket_high values: [average-size × bucket_low, average-size × bucket_high].

If no call is made to this method, the default value set by Cassandra is 0.5.

Parameters:
bucketLow - the new value.
Returns:
this object (for call chaining).

public TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions coldReadsRatioToOmit(Double coldReadsRatio)
The maximum percentage of reads/sec that ignored SSTables may account for. The recommended range of values is 0.0 and 1.0. In Cassandra 2.0.3 and later, you can enable the cold_reads_to_omit property to tune performace per table. The Optimizations around Cold SSTables blog includes detailed information tuning performance using this property, which avoids compacting cold SSTables. Use the ALTER TABLE command to configure cold_reads_to_omit.

If no call is made to this method, the default value set by Cassandra is 0.0 (disabled).

Parameters:
coldReadsRatio - the new value.
Returns:
this object (for call chaining).
• #### minThreshold

public TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions minThreshold(Integer minThreshold)
Sets the minimum number of SSTables to trigger a minor compaction

If no call is made to this method, the default value set by Cassandra is 4.

Parameters:
minThreshold - the new value.
Returns:
this object (for call chaining).
• #### maxThreshold

public TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions maxThreshold(Integer maxThreshold)
Sets the maximum number of SSTables to allow in a minor compaction. In LeveledCompactionStrategy (LCS), it applies to L0 when L0 gets behind, that is, when L0 accumulates more than MAX_COMPACTING_L0 SSTables.

If no call is made to this method, the default value set by Cassandra is 32.

Parameters:
maxThreshold - the new value.
Returns:
this object (for call chaining).
• #### minSSTableSizeInBytes

public TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions minSSTableSizeInBytes(Long minSSTableSize)
The SizeTieredCompactionStrategy groups SSTables for compaction into buckets. The bucketing process groups SSTables that differ in size by less than 50%. This results in a bucketing process that is too fine grained for small SSTables. If your SSTables are small, use min_sstable_size to define a size threshold (in bytes) below which all SSTables belong to one unique bucket

If no call is made to this method, the default value set by Cassandra is 52428800 (50 MB).

Parameters:
minSSTableSize - the new value.
Returns:
this object (for call chaining).
• #### build

public String build()
Specified by:
build in class TableOptions.CompactionOptions<TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions>