public class SizeTieredCompactionStrategy extends AbstractCompactionStrategy
Modifier and Type | Field and Description |
---|---|
protected int |
estimatedRemainingTasks |
protected SizeTieredCompactionStrategyOptions |
options |
cfs, COMPACTION_ENABLED, DEFAULT_TOMBSTONE_COMPACTION_INTERVAL, DEFAULT_TOMBSTONE_THRESHOLD, DEFAULT_UNCHECKED_TOMBSTONE_COMPACTION_OPTION, disableTombstoneCompactions, enabled, isActive, 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 |
---|---|
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() |
AbstractCompactionTask |
getMaximalTask(int gcBefore) |
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) |
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) |
disable, enable, filterSSTablesForReads, filterSuspectSSTables, getCompactionTask, getMemtableReservedSize, getScanners, getScanners, isAffectedByMeteredFlusher, isEnabled, pause, replaceFlushed, resume, shouldBeEnabled, shutdown, startup, worthDroppingTombstones
protected SizeTieredCompactionStrategyOptions options
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 AbstractCompactionTask getMaximalTask(int gcBefore)
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 java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2015 The Apache Software Foundation