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.util.Collection<SSTableReader> sstables,
int gcBefore) |
| Modifier and Type | Method and Description |
|---|---|
static long |
addToTotalBytesCompacted(long bytesCompacted) |
protected int |
executeInternal(CompactionManager.CompactionExecutorStatsCollector collector) |
protected CompactionController |
getCompactionController(java.util.Collection<SSTableReader> toCompact) |
long |
getExpectedWriteSize()
Get expected write size to determine which disk to use for this task.
|
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 |
replaceCompactedSSTables(java.util.Collection<SSTableReader> compacted,
java.util.Collection<SSTableReader> replacements) |
protected void |
runWith(java.io.File sstableDirectory)
For internal use and testing only.
|
execute, getDirectories, setCompactionType, setUserDefined, toStringrunMayThrowrunprotected static final org.slf4j.Logger logger
protected final int gcBefore
protected static long totalBytesCompacted
public CompactionTask(ColumnFamilyStore cfs, java.util.Collection<SSTableReader> sstables, int gcBefore)
public static long addToTotalBytesCompacted(long bytesCompacted)
protected int executeInternal(CompactionManager.CompactionExecutorStatsCollector collector)
executeInternal in class AbstractCompactionTaskpublic long getExpectedWriteSize()
DiskAwareRunnablegetExpectedWriteSize in class DiskAwareRunnablepublic boolean reduceScopeForLimitedSpace()
DiskAwareRunnablereduceScopeForLimitedSpace in class DiskAwareRunnableprotected void runWith(java.io.File sstableDirectory)
throws java.lang.Exception
runWith in class DiskAwareRunnablesstableDirectory - sstable directory to work onjava.lang.Exceptionprotected void replaceCompactedSSTables(java.util.Collection<SSTableReader> compacted, java.util.Collection<SSTableReader> replacements)
protected CompactionController getCompactionController(java.util.Collection<SSTableReader> toCompact)
protected boolean partialCompactionsAcceptable()
protected boolean newSSTableSegmentThresholdReached(SSTableWriter writer)
public static long getMaxDataAge(java.util.Collection<SSTableReader> sstables)
Copyright © 2014 The Apache Software Foundation