Class PendingRepairHolder
- java.lang.Object
-
- org.apache.cassandra.db.compaction.AbstractStrategyHolder
-
- org.apache.cassandra.db.compaction.PendingRepairHolder
-
public class PendingRepairHolder 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 PendingRepairHolder(ColumnFamilyStore cfs, AbstractStrategyHolder.DestinationRouter router, boolean isTransient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSSTable(SSTableReader sstable)
void
addSSTables(AbstractStrategyHolder.GroupedSSTableContainer sstables)
java.lang.Iterable<AbstractCompactionStrategy>
allStrategies()
boolean
containsSSTable(SSTableReader sstable)
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)
java.util.Collection<AbstractStrategyHolder.TaskSupplier>
getBackgroundTaskSuppliers(long gcBefore)
int
getEstimatedRemainingTasks()
java.lang.Iterable<org.apache.cassandra.db.compaction.PendingRepairManager>
getManagers()
java.util.Collection<AbstractCompactionTask>
getMaximalTasks(long gcBefore, boolean splitOutput)
java.util.List<ISSTableScanner>
getScanners(AbstractStrategyHolder.GroupedSSTableContainer sstables, java.util.Collection<Range<Token>> ranges)
AbstractCompactionStrategy
getStrategyFor(SSTableReader sstable)
int
getStrategyIndex(AbstractCompactionStrategy strategy)
Return the directory index the given compaction strategy belongs to, or -1 if it's not held by this holderjava.util.Collection<AbstractCompactionTask>
getUserDefinedTasks(AbstractStrategyHolder.GroupedSSTableContainer sstables, long gcBefore)
boolean
hasDataForSession(TimeUUID sessionID)
boolean
hasPendingRepairSSTable(TimeUUID sessionID, SSTableReader sstable)
boolean
managesRepairedGroup(boolean isRepaired, boolean isPendingRepair, boolean isTransient)
SSTables are grouped by their repaired and pending repair status.void
removeSSTables(AbstractStrategyHolder.GroupedSSTableContainer sstables)
void
replaceSSTables(AbstractStrategyHolder.GroupedSSTableContainer removed, AbstractStrategyHolder.GroupedSSTableContainer added)
void
setStrategyInternal(CompactionParams params, int numTokenPartitions)
void
shutdown()
void
startup()
-
Methods inherited from class org.apache.cassandra.db.compaction.AbstractStrategyHolder
createGroupedSSTableContainer, managesSSTable
-
-
-
-
Constructor Detail
-
PendingRepairHolder
public PendingRepairHolder(ColumnFamilyStore cfs, AbstractStrategyHolder.DestinationRouter router, boolean isTransient)
-
-
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
-
getManagers
public java.lang.Iterable<org.apache.cassandra.db.compaction.PendingRepairManager> getManagers()
-
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
-
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
-
hasDataForSession
public boolean hasDataForSession(TimeUUID sessionID)
-
containsSSTable
public boolean containsSSTable(SSTableReader sstable)
- Specified by:
containsSSTable
in classAbstractStrategyHolder
-
getEstimatedRemainingTasks
public int getEstimatedRemainingTasks()
- Specified by:
getEstimatedRemainingTasks
in classAbstractStrategyHolder
-
hasPendingRepairSSTable
public boolean hasPendingRepairSSTable(TimeUUID sessionID, SSTableReader sstable)
-
-