public class SizeTieredCompactionStrategy extends AbstractCompactionStrategy
AbstractCompactionStrategy.ScannerList
Modifier and Type | Field and Description |
---|---|
protected int |
estimatedRemainingTasks |
protected SizeTieredCompactionStrategyOptions |
sizeTieredOptions |
cfs, COMPACTION_ENABLED, DEFAULT_TOMBSTONE_COMPACTION_INTERVAL, DEFAULT_TOMBSTONE_THRESHOLD, DEFAULT_UNCHECKED_TOMBSTONE_COMPACTION_OPTION, disableTombstoneCompactions, isActive, 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) |
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) |
createSSTableMultiWriter, disable, enable, filterSuspectSSTables, getCompactionTask, getDirectories, getMemtableReservedSize, getName, getScanners, getScanners, getScanners, groupSSTablesForAntiCompaction, isAffectedByMeteredFlusher, pause, replaceFlushed, replaceSSTables, resume, shouldBeEnabled, shutdown, startup, supportsEarlyOpen, worthDroppingTombstones
protected SizeTieredCompactionStrategyOptions sizeTieredOptions
protected volatile int estimatedRemainingTasks
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 AbstractCompactionStrategy
gcBefore
- throw away tombstones older than thispublic java.util.Collection<AbstractCompactionTask> getMaximalTask(int gcBefore, boolean splitOutput)
getMaximalTask
in class AbstractCompactionStrategy
gcBefore
- throw away tombstones older than thispublic AbstractCompactionTask getUserDefinedTask(java.util.Collection<SSTableReader> sstables, int gcBefore)
getUserDefinedTask
in class AbstractCompactionStrategy
sstables
- SSTables to compact. Must be marked as compacting.gcBefore
- throw away tombstones older than thispublic int getEstimatedRemainingTasks()
getEstimatedRemainingTasks
in class AbstractCompactionStrategy
public 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 long getMaxSSTableBytes()
getMaxSSTableBytes
in class AbstractCompactionStrategy
public static java.util.Map<java.lang.String,java.lang.String> validateOptions(java.util.Map<java.lang.String,java.lang.String> options) throws ConfigurationException
ConfigurationException
public boolean shouldDefragment()
shouldDefragment
in class AbstractCompactionStrategy
public void addSSTable(SSTableReader added)
addSSTable
in class AbstractCompactionStrategy
public void removeSSTable(SSTableReader sstable)
removeSSTable
in class AbstractCompactionStrategy
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2016 The Apache Software Foundation