Class CompactionStrategyHolder
- java.lang.Object
-
- org.apache.cassandra.db.compaction.AbstractStrategyHolder
-
- org.apache.cassandra.db.compaction.CompactionStrategyHolder
-
public class CompactionStrategyHolder extends AbstractStrategyHolder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.db.compaction.AbstractStrategyHolder
AbstractStrategyHolder.DestinationRouter, AbstractStrategyHolder.GroupedSSTableContainer, AbstractStrategyHolder.TaskSupplier
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.db.compaction.AbstractStrategyHolder
cfs
-
-
Constructor Summary
Constructors Constructor Description CompactionStrategyHolder(ColumnFamilyStore cfs, AbstractStrategyHolder.DestinationRouter router, boolean isRepaired)
-
Method Summary
-
Methods inherited from class org.apache.cassandra.db.compaction.AbstractStrategyHolder
createGroupedSSTableContainer, managesSSTable
-
-
-
-
Constructor Detail
-
CompactionStrategyHolder
public CompactionStrategyHolder(ColumnFamilyStore cfs, AbstractStrategyHolder.DestinationRouter router, boolean isRepaired)
-
-
Method Detail
-
startup
public void startup()
- Specified by:
startup
in classAbstractStrategyHolder
-
shutdown
public void shutdown()
- Specified by:
shutdown
in classAbstractStrategyHolder
-
setStrategyInternal
public void setStrategyInternal(CompactionParams params, int numTokenPartitions)
- Specified by:
setStrategyInternal
in classAbstractStrategyHolder
-
managesRepairedGroup
public boolean managesRepairedGroup(boolean isRepaired, boolean isPendingRepair, boolean isTransient)
Description copied from class:AbstractStrategyHolder
SSTables are grouped by their repaired and pending repair status. This method determines if this holder holds the sstable for the given repaired/grouped statuses. Holders should be mutually exclusive in the groups they deal with. IOW, if one holder returns true for a given isRepaired/isPendingRepair combo, none of the others should.- Specified by:
managesRepairedGroup
in classAbstractStrategyHolder
-
getStrategyFor
public AbstractCompactionStrategy getStrategyFor(SSTableReader sstable)
- Specified by:
getStrategyFor
in classAbstractStrategyHolder
-
allStrategies
public java.lang.Iterable<AbstractCompactionStrategy> allStrategies()
- Specified by:
allStrategies
in classAbstractStrategyHolder
-
getBackgroundTaskSuppliers
public java.util.Collection<AbstractStrategyHolder.TaskSupplier> getBackgroundTaskSuppliers(long gcBefore)
- Specified by:
getBackgroundTaskSuppliers
in classAbstractStrategyHolder
-
getMaximalTasks
public java.util.Collection<AbstractCompactionTask> getMaximalTasks(long gcBefore, boolean splitOutput)
- Specified by:
getMaximalTasks
in classAbstractStrategyHolder
-
getUserDefinedTasks
public java.util.Collection<AbstractCompactionTask> getUserDefinedTasks(AbstractStrategyHolder.GroupedSSTableContainer sstables, long gcBefore)
- Specified by:
getUserDefinedTasks
in classAbstractStrategyHolder
-
addSSTable
public void addSSTable(SSTableReader sstable)
- Specified by:
addSSTable
in classAbstractStrategyHolder
-
addSSTables
public void addSSTables(AbstractStrategyHolder.GroupedSSTableContainer sstables)
- Specified by:
addSSTables
in classAbstractStrategyHolder
-
removeSSTables
public void removeSSTables(AbstractStrategyHolder.GroupedSSTableContainer sstables)
- Specified by:
removeSSTables
in classAbstractStrategyHolder
-
replaceSSTables
public void replaceSSTables(AbstractStrategyHolder.GroupedSSTableContainer removed, AbstractStrategyHolder.GroupedSSTableContainer added)
- Specified by:
replaceSSTables
in classAbstractStrategyHolder
-
first
public AbstractCompactionStrategy first()
-
getScanners
public java.util.List<ISSTableScanner> getScanners(AbstractStrategyHolder.GroupedSSTableContainer sstables, java.util.Collection<Range<Token>> ranges)
- Specified by:
getScanners
in classAbstractStrategyHolder
-
createSSTableMultiWriter
public SSTableMultiWriter createSSTableMultiWriter(Descriptor descriptor, long keyCount, long repairedAt, TimeUUID pendingRepair, boolean isTransient, IntervalSet<CommitLogPosition> commitLogPositions, int sstableLevel, SerializationHeader header, java.util.Collection<Index.Group> indexGroups, LifecycleNewTracker lifecycleNewTracker)
- Specified by:
createSSTableMultiWriter
in classAbstractStrategyHolder
-
getStrategyIndex
public int getStrategyIndex(AbstractCompactionStrategy strategy)
Description copied from class:AbstractStrategyHolder
Return the directory index the given compaction strategy belongs to, or -1 if it's not held by this holder- Specified by:
getStrategyIndex
in classAbstractStrategyHolder
-
containsSSTable
public boolean containsSSTable(SSTableReader sstable)
- Specified by:
containsSSTable
in classAbstractStrategyHolder
-
getEstimatedRemainingTasks
public int getEstimatedRemainingTasks()
- Specified by:
getEstimatedRemainingTasks
in classAbstractStrategyHolder
-
-