public class CompactionTask extends AbstractCompactionTask
Modifier and Type | Field and Description |
---|---|
protected int |
gcBefore |
protected static org.slf4j.Logger |
logger |
protected static long |
totalBytesCompacted |
cfs, compactionType, isUserDefined, sstables
Constructor and Description |
---|
CompactionTask(ColumnFamilyStore cfs,
java.lang.Iterable<SSTableReader> sstables,
int gcBefore) |
Modifier and Type | Method and Description |
---|---|
static long |
addToTotalBytesCompacted(long bytesCompacted) |
protected int |
executeInternal(CompactionManager.CompactionExecutorStatsCollector collector) |
long |
getExpectedWriteSize()
Get expected write size to determine which disk to use for this task.
|
protected int |
getLevel() |
static long |
getMaxDataAge(java.util.Collection<SSTableReader> sstables) |
protected boolean |
newSSTableSegmentThresholdReached(SSTableWriter writer) |
protected boolean |
partialCompactionsAcceptable() |
boolean |
reduceScopeForLimitedSpace()
Called if no disk is available with free space for the full write size.
|
protected void |
runWith(java.io.File sstableDirectory)
For internal use and testing only.
|
execute, getDirectories, setCompactionType, setUserDefined, toString
runMayThrow
run
protected static final org.slf4j.Logger logger
protected final int gcBefore
protected static long totalBytesCompacted
public CompactionTask(ColumnFamilyStore cfs, java.lang.Iterable<SSTableReader> sstables, int gcBefore)
public static long addToTotalBytesCompacted(long bytesCompacted)
protected int executeInternal(CompactionManager.CompactionExecutorStatsCollector collector)
executeInternal
in class AbstractCompactionTask
public long getExpectedWriteSize()
DiskAwareRunnable
getExpectedWriteSize
in class DiskAwareRunnable
public boolean reduceScopeForLimitedSpace()
DiskAwareRunnable
reduceScopeForLimitedSpace
in class DiskAwareRunnable
protected void runWith(java.io.File sstableDirectory) throws java.lang.Exception
runWith
in class DiskAwareRunnable
sstableDirectory
- sstable directory to work onjava.lang.Exception
protected int getLevel()
protected boolean partialCompactionsAcceptable()
protected boolean newSSTableSegmentThresholdReached(SSTableWriter writer)
public static long getMaxDataAge(java.util.Collection<SSTableReader> sstables)
Copyright © 2013 The Apache Software Foundation