org.apache.cassandra.db.compaction
Class AbstractCompactionTask
java.lang.Object
org.apache.cassandra.utils.WrappedRunnable
org.apache.cassandra.io.util.DiskAwareRunnable
org.apache.cassandra.db.compaction.AbstractCompactionTask
- All Implemented Interfaces:
- java.lang.Runnable
- Direct Known Subclasses:
- CompactionTask
public abstract class AbstractCompactionTask
- extends DiskAwareRunnable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
cfs
protected final ColumnFamilyStore cfs
sstables
protected java.util.Collection<SSTableReader> sstables
isUserDefined
protected boolean isUserDefined
compactionType
protected OperationType compactionType
AbstractCompactionTask
public AbstractCompactionTask(ColumnFamilyStore cfs,
java.util.Collection<SSTableReader> sstables)
execute
public abstract int execute(CompactionManager.CompactionExecutorStatsCollector collector)
getColumnFamilyStore
public ColumnFamilyStore getColumnFamilyStore()
getSSTables
public java.util.Collection<SSTableReader> getSSTables()
markSSTablesForCompaction
public boolean markSSTablesForCompaction()
- Try to mark the sstable to compact as compacting.
It returns true if some sstables have been marked for compaction, false
otherwise.
This *must* be called before calling execute(). Moreover,
unmarkSSTables *must* always be called after execute() if this
method returns true.
markSSTablesForCompaction
public boolean markSSTablesForCompaction(int min,
int max)
unmarkSSTables
public void unmarkSSTables()
cancel
protected void cancel()
isUserDefined
public AbstractCompactionTask isUserDefined(boolean isUserDefined)
setCompactionType
public AbstractCompactionTask setCompactionType(OperationType compactionType)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2012 The Apache Software Foundation