Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.db.compaction
Class LeveledCompactionTask

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

    public class LeveledCompactionTask

extends CompactionTask

Field Summary

Fields inherited from class org.apache.cassandra.db.compaction.CompactionTask
`compactionType, gcBefore, isUserDefined, logger, 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 void` | `cancel()`
`int` | `execute(CompactionManager.CompactionExecutorStatsCollector collector)` For internal use and testing only.
`protected boolean` | `isCompactionInteresting(java.util.Set<SSTableReader> toCompact)`
`boolean` | `isDone()`
`boolean` | `markSSTablesForCompaction(int min, int max)`
`protected boolean` | `newSSTableSegmentThresholdReached(SSTableWriter writer)`
`protected boolean` | `partialCompactionsAcceptable()`

Methods inherited from class org.apache.cassandra.db.compaction.CompactionTask
`addToTotalBytesCompacted, getMaxDataAge, isUserDefined, setCompactionType`

Methods inherited from class org.apache.cassandra.db.compaction.AbstractCompactionTask
`getColumnFamilyStore, getSSTables, markSSTablesForCompaction, toString, unmarkSSTables`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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()

### markSSTablesForCompaction

    public boolean markSSTablesForCompaction(int min,
                                             int max)

  Overrides:
    `markSSTablesForCompaction` in class `AbstractCompactionTask`

### newSSTableSegmentThresholdReached

    protected boolean newSSTableSegmentThresholdReached(SSTableWriter writer)
                                                 throws java.io.IOException

  Overrides:
    `newSSTableSegmentThresholdReached` in class `CompactionTask`
  Throws:
    `java.io.IOException`

### isCompactionInteresting

    protected boolean isCompactionInteresting(java.util.Set<SSTableReader> toCompact)

  Overrides:
    `isCompactionInteresting` in class `CompactionTask`
  Returns:
    true if the proposed compaction is worth proceeding with. We allow leveled compaction to override this to allow "promoting" sstables from one level to another w/o rewriting them, if there is no overlapping.

### partialCompactionsAcceptable

    protected boolean partialCompactionsAcceptable()

  Overrides:
    `partialCompactionsAcceptable` in class `CompactionTask`

### cancel

    protected void cancel()

  Overrides:
    `cancel` in class `AbstractCompactionTask`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013 The Apache Software Foundation