public class SizeTieredCompactionStrategy extends AbstractCompactionStrategy
AbstractCompactionStrategy.ScannerList| Modifier and Type | Field and Description | 
|---|---|
| protected int | estimatedRemainingTasks | 
| protected SizeTieredCompactionStrategyOptions | sizeTieredOptions | 
| protected java.util.Set<SSTableReader> | sstables | 
cfs, COMPACTION_ENABLED, DEFAULT_LOG_ALL_OPTION, DEFAULT_TOMBSTONE_COMPACTION_INTERVAL, DEFAULT_TOMBSTONE_THRESHOLD, DEFAULT_UNCHECKED_TOMBSTONE_COMPACTION_OPTION, disableTombstoneCompactions, isActive, LOG_ALL_OPTION, logAll, ONLY_PURGE_REPAIRED_TOMBSTONES, options, TOMBSTONE_COMPACTION_INTERVAL_OPTION, TOMBSTONE_THRESHOLD_OPTION, tombstoneCompactionInterval, tombstoneThreshold, UNCHECKED_TOMBSTONE_COMPACTION_OPTION, uncheckedTombstoneCompaction| Constructor and Description | 
|---|
| SizeTieredCompactionStrategy(ColumnFamilyStore cfs,
                            java.util.Map<java.lang.String,java.lang.String> options) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addSSTable(SSTableReader added) | 
| static java.util.List<Pair<SSTableReader,java.lang.Long>> | createSSTableAndLengthPairs(java.lang.Iterable<SSTableReader> sstables) | 
| static <T> java.util.List<java.util.List<T>> | getBuckets(java.util.Collection<Pair<T,java.lang.Long>> files,
          double bucketHigh,
          double bucketLow,
          long minSSTableSize) | 
| static int | getEstimatedCompactionsByTasks(ColumnFamilyStore cfs,
                              java.util.List<java.util.List<SSTableReader>> tasks) | 
| int | getEstimatedRemainingTasks() | 
| java.util.Collection<AbstractCompactionTask> | getMaximalTask(int gcBefore,
              boolean splitOutput) | 
| long | getMaxSSTableBytes() | 
| AbstractCompactionTask | getNextBackgroundTask(int gcBefore) | 
| AbstractCompactionTask | getUserDefinedTask(java.util.Collection<SSTableReader> sstables,
                  int gcBefore) | 
| static java.util.List<SSTableReader> | mostInterestingBucket(java.util.List<java.util.List<SSTableReader>> buckets,
                     int minThreshold,
                     int maxThreshold) | 
| void | removeSSTable(SSTableReader sstable) | 
| boolean | shouldDefragment() | 
| java.lang.String | toString() | 
| static java.util.Map<java.lang.String,java.lang.String> | validateOptions(java.util.Map<java.lang.String,java.lang.String> options) | 
addSSTables, createSSTableMultiWriter, disable, enable, filterSuspectSSTables, getCompactionTask, getDirectories, getMemtableReservedSize, getName, getScanners, getScanners, getScanners, groupSSTablesForAntiCompaction, isAffectedByMeteredFlusher, pause, replaceFlushed, replaceSSTables, resume, shouldBeEnabled, shutdown, startup, strategyLogger, supportsEarlyOpen, worthDroppingTombstonesprotected SizeTieredCompactionStrategyOptions sizeTieredOptions
protected volatile int estimatedRemainingTasks
protected final java.util.Set<SSTableReader> sstables
public SizeTieredCompactionStrategy(ColumnFamilyStore cfs, java.util.Map<java.lang.String,java.lang.String> options)
public static java.util.List<SSTableReader> mostInterestingBucket(java.util.List<java.util.List<SSTableReader>> buckets, int minThreshold, int maxThreshold)
buckets - list of buckets from which to return the most interesting, where "interesting" is the total hotness for readsminThreshold - minimum number of sstables in a bucket to qualify as interestingmaxThreshold - maximum number of sstables to compact at once (the returned bucket will be trimmed down to this)public AbstractCompactionTask getNextBackgroundTask(int gcBefore)
getNextBackgroundTask in class AbstractCompactionStrategygcBefore - throw away tombstones older than thispublic java.util.Collection<AbstractCompactionTask> getMaximalTask(int gcBefore, boolean splitOutput)
getMaximalTask in class AbstractCompactionStrategygcBefore - throw away tombstones older than thispublic AbstractCompactionTask getUserDefinedTask(java.util.Collection<SSTableReader> sstables, int gcBefore)
getUserDefinedTask in class AbstractCompactionStrategysstables - SSTables to compact. Must be marked as compacting.gcBefore - throw away tombstones older than thispublic int getEstimatedRemainingTasks()
getEstimatedRemainingTasks in class AbstractCompactionStrategypublic static java.util.List<Pair<SSTableReader,java.lang.Long>> createSSTableAndLengthPairs(java.lang.Iterable<SSTableReader> sstables)
public static <T> java.util.List<java.util.List<T>> getBuckets(java.util.Collection<Pair<T,java.lang.Long>> files, double bucketHigh, double bucketLow, long minSSTableSize)
public static int getEstimatedCompactionsByTasks(ColumnFamilyStore cfs, java.util.List<java.util.List<SSTableReader>> tasks)
public long getMaxSSTableBytes()
getMaxSSTableBytes in class AbstractCompactionStrategypublic static java.util.Map<java.lang.String,java.lang.String> validateOptions(java.util.Map<java.lang.String,java.lang.String> options)
                                                                        throws ConfigurationException
ConfigurationExceptionpublic boolean shouldDefragment()
shouldDefragment in class AbstractCompactionStrategypublic void addSSTable(SSTableReader added)
addSSTable in class AbstractCompactionStrategypublic void removeSSTable(SSTableReader sstable)
removeSSTable in class AbstractCompactionStrategypublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018 The Apache Software Foundation