|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.db.compaction.AbstractCompactionStrategy
public abstract class AbstractCompactionStrategy
Pluggable compaction strategy determines how SSTables get merged. There are two main goals: - perform background compaction constantly as needed; this typically makes a tradeoff between i/o done by compaction, and merging done at read time. - perform a full (maximum possible) compaction if requested by the user
Field Summary | |
---|---|
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
|
Constructor Summary | |
---|---|
protected |
AbstractCompactionStrategy(ColumnFamilyStore cfs,
java.util.Map<java.lang.String,java.lang.String> options)
|
Method Summary | |
---|---|
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). |
protected boolean |
worthDroppingTombstones(SSTableReader sstable,
int gcBefore)
Check if given sstable is worth dropping tombstones at gcBefore. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 final float tombstoneThreshold
protected long tombstoneCompactionInterval
Constructor Detail |
---|
protected AbstractCompactionStrategy(ColumnFamilyStore cfs, java.util.Map<java.lang.String,java.lang.String> options)
Method Detail |
---|
public void shutdown()
public abstract AbstractCompactionTask getNextBackgroundTask(int gcBefore)
gcBefore
- throw away tombstones older than this
public abstract AbstractCompactionTask getMaximalTask(int gcBefore)
gcBefore
- throw away tombstones older than this
public 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 this
public 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 SSTables
public 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 tombstones
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |