public class LeveledCompactionStrategy extends AbstractCompactionStrategy implements INotificationConsumer
cfs, COMPACTION_ENABLED, DEFAULT_TOMBSTONE_COMPACTION_INTERVAL, DEFAULT_TOMBSTONE_THRESHOLD, enabled, isActive, options, TOMBSTONE_COMPACTION_INTERVAL_OPTION, TOMBSTONE_THRESHOLD_OPTION, tombstoneCompactionInterval, tombstoneThreshold
Constructor and Description |
---|
LeveledCompactionStrategy(ColumnFamilyStore cfs,
java.util.Map<java.lang.String,java.lang.String> options) |
Modifier and Type | Method and Description |
---|---|
int[] |
getAllLevelSize() |
int |
getEstimatedRemainingTasks() |
int |
getLevelSize(int i) |
AbstractCompactionTask |
getMaximalTask(int gcBefore) |
long |
getMaxSSTableSize() |
AbstractCompactionTask |
getNextBackgroundTask(int gcBefore)
the only difference between background and maximal in LCS is that maximal is still allowed
(by explicit user request) even when compaction is disabled.
|
java.util.List<ICompactionScanner> |
getScanners(java.util.Collection<SSTableReader> sstables,
Range<Token> range)
Returns a list of KeyScanners given sstables and a range on which to scan.
|
AbstractCompactionTask |
getUserDefinedTask(java.util.Collection<SSTableReader> sstables,
int gcBefore) |
void |
handleNotification(INotification notification,
java.lang.Object sender) |
void |
shutdown()
Releases any resources if this strategy is shutdown (when the CFS is reloaded after a schema change).
|
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, filterSuspectSSTables, getScanners, isEnabled, pause, resume, worthDroppingTombstones
public LeveledCompactionStrategy(ColumnFamilyStore cfs, java.util.Map<java.lang.String,java.lang.String> options)
public void shutdown()
AbstractCompactionStrategy
shutdown
in class AbstractCompactionStrategy
public int getLevelSize(int i)
public int[] getAllLevelSize()
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 void handleNotification(INotification notification, java.lang.Object sender)
handleNotification
in interface INotificationConsumer
public long getMaxSSTableSize()
getMaxSSTableSize
in class AbstractCompactionStrategy
public java.util.List<ICompactionScanner> getScanners(java.util.Collection<SSTableReader> sstables, Range<Token> range)
AbstractCompactionStrategy
getScanners
in class AbstractCompactionStrategy
public java.lang.String toString()
toString
in class java.lang.Object
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
Copyright © 2013 The Apache Software Foundation