public abstract class AbstractCompactionStrategy
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ColumnFamilyStore |
cfs |
protected static long |
DEFAULT_TOMBSTONE_COMPACTION_INTERVAL |
protected static float |
DEFAULT_TOMBSTONE_THRESHOLD |
java.util.Map<java.lang.String,java.lang.String> |
options |
protected static java.lang.String |
TOMBSTONE_COMPACTION_INTERVAL_OPTION |
protected static java.lang.String |
TOMBSTONE_THRESHOLD_OPTION |
protected long |
tombstoneCompactionInterval |
protected float |
tombstoneThreshold |
Modifier | Constructor and Description |
---|---|
protected |
AbstractCompactionStrategy(ColumnFamilyStore cfs,
java.util.Map<java.lang.String,java.lang.String> options) |
Modifier and Type | Method and Description |
---|---|
static java.util.List<SSTableReader> |
filterSuspectSSTables(java.util.Collection<SSTableReader> originalCandidates)
Filters SSTables that are to be blacklisted from the given collection
|
abstract int |
getEstimatedRemainingTasks() |
abstract AbstractCompactionTask |
getMaximalTask(int gcBefore) |
abstract long |
getMaxSSTableSize() |
abstract AbstractCompactionTask |
getNextBackgroundTask(int gcBefore) |
java.util.List<ICompactionScanner> |
getScanners(java.util.Collection<SSTableReader> toCompact) |
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.
|
abstract AbstractCompactionTask |
getUserDefinedTask(java.util.Collection<SSTableReader> sstables,
int gcBefore) |
void |
shutdown()
Releases any resources if this strategy is shutdown (when the CFS is reloaded after a schema change).
|
static java.util.Map<java.lang.String,java.lang.String> |
validateOptions(java.util.Map<java.lang.String,java.lang.String> options) |
protected boolean |
worthDroppingTombstones(SSTableReader sstable,
int gcBefore)
Check if given sstable is worth dropping tombstones at gcBefore.
|
protected static final float DEFAULT_TOMBSTONE_THRESHOLD
protected static final long DEFAULT_TOMBSTONE_COMPACTION_INTERVAL
protected static final java.lang.String TOMBSTONE_THRESHOLD_OPTION
protected static final java.lang.String TOMBSTONE_COMPACTION_INTERVAL_OPTION
public final java.util.Map<java.lang.String,java.lang.String> options
protected final ColumnFamilyStore cfs
protected float tombstoneThreshold
protected long tombstoneCompactionInterval
protected AbstractCompactionStrategy(ColumnFamilyStore cfs, java.util.Map<java.lang.String,java.lang.String> options)
public void shutdown()
public abstract AbstractCompactionTask getNextBackgroundTask(int gcBefore)
gcBefore
- throw away tombstones older than thispublic abstract AbstractCompactionTask getMaximalTask(int gcBefore)
gcBefore
- throw away tombstones older than thispublic abstract AbstractCompactionTask getUserDefinedTask(java.util.Collection<SSTableReader> sstables, int gcBefore)
sstables
- SSTables to compact. Must be marked as compacting.gcBefore
- throw away tombstones older than thispublic abstract int getEstimatedRemainingTasks()
public abstract long getMaxSSTableSize()
public static java.util.List<SSTableReader> filterSuspectSSTables(java.util.Collection<SSTableReader> originalCandidates)
originalCandidates
- The collection to check for blacklisted SSTablespublic java.util.List<ICompactionScanner> getScanners(java.util.Collection<SSTableReader> sstables, Range<Token> range)
public java.util.List<ICompactionScanner> getScanners(java.util.Collection<SSTableReader> toCompact)
protected boolean worthDroppingTombstones(SSTableReader sstable, int gcBefore)
sstable
- SSTable to checkgcBefore
- time to drop tombstonespublic 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