org.apache.cassandra.db.compaction
Class LeveledCompactionTask

java.lang.Object
  extended by org.apache.cassandra.db.compaction.AbstractCompactionTask
      extended by org.apache.cassandra.db.compaction.CompactionTask
          extended by org.apache.cassandra.db.compaction.LeveledCompactionTask

public class LeveledCompactionTask
extends CompactionTask


Field Summary
 
Fields inherited from class org.apache.cassandra.db.compaction.CompactionTask
compactionFileLocation, gcBefore, isUserDefined, totalBytesCompacted
 
Fields inherited from class org.apache.cassandra.db.compaction.AbstractCompactionTask
cfs, sstables
 
Constructor Summary
LeveledCompactionTask(ColumnFamilyStore cfs, java.util.Collection<SSTableReader> sstables, int gcBefore, int sstableSizeInMB)
           
 
Method Summary
protected  boolean allowSingletonCompaction()
          extend this if the overridden compaction strategy requires single files to be compacted to function properly
 int execute(CompactionManager.CompactionExecutorStatsCollector collector)
          For internal use and testing only.
 boolean isDone()
           
protected  boolean newSSTableSegmentThresholdReached(SSTableWriter writer, long position)
           
 
Methods inherited from class org.apache.cassandra.db.compaction.CompactionTask
addToTotalBytesCompacted, compactionFileLocation, getMaxDataAge, isUserDefined
 
Methods inherited from class org.apache.cassandra.db.compaction.AbstractCompactionTask
getColumnFamilyStore, getSSTables, markSSTablesForCompaction, markSSTablesForCompaction, unmarkSSTables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LeveledCompactionTask

public LeveledCompactionTask(ColumnFamilyStore cfs,
                             java.util.Collection<SSTableReader> sstables,
                             int gcBefore,
                             int sstableSizeInMB)
Method Detail

execute

public int execute(CompactionManager.CompactionExecutorStatsCollector collector)
            throws java.io.IOException
Description copied from class: CompactionTask
For internal use and testing only. The rest of the system should go through the submit* methods, which are properly serialized. Caller is in charge of marking/unmarking the sstables as compacting.

Overrides:
execute in class CompactionTask
Throws:
java.io.IOException

isDone

public boolean isDone()

newSSTableSegmentThresholdReached

protected boolean newSSTableSegmentThresholdReached(SSTableWriter writer,
                                                    long position)
Overrides:
newSSTableSegmentThresholdReached in class CompactionTask

allowSingletonCompaction

protected boolean allowSingletonCompaction()
Description copied from class: CompactionTask
extend this if the overridden compaction strategy requires single files to be compacted to function properly

Overrides:
allowSingletonCompaction in class CompactionTask
Returns:
boolean


Copyright © 2011 The Apache Software Foundation