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 SizeTieredCompactionStrategy

    java.lang.Object
      org.apache.cassandra.db.compaction.AbstractCompactionStrategy
          org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy

    public class SizeTieredCompactionStrategy

extends AbstractCompactionStrategy

Field Summary
`protected static long` | `DEFAULT_MIN_SSTABLE_SIZE`
`protected int` | `estimatedRemainingTasks`
`protected static java.lang.String` | `MIN_SSTABLE_SIZE_KEY`
`protected long` | `minSSTableSize`

Fields inherited from class org.apache.cassandra.db.compaction.AbstractCompactionStrategy
`cfs, options`

Constructor Summary
`SizeTieredCompactionStrategy(ColumnFamilyStore cfs, java.util.Map<java.lang.String,java.lang.String> options)`

Method Summary
`int` | `getEstimatedRemainingTasks()`
`AbstractCompactionTask` | `getMaximalTask(int gcBefore)`
`long` | `getMaxSSTableSize()`
`long` | `getMinSSTableSize()`
`AbstractCompactionTask` | `getNextBackgroundTask(int gcBefore)`
`AbstractCompactionTask` | `getUserDefinedTask(java.util.Collection<SSTableReader> sstables, int gcBefore)`
`boolean` | `isKeyExistenceExpensive(java.util.Set<? extends SSTable> sstablesToIgnore)`
`java.lang.String` | `toString()`

Methods inherited from class org.apache.cassandra.db.compaction.AbstractCompactionStrategy
`filterSuspectSSTables, getOptions, getScanners, getScanners, shutdown`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### DEFAULT_MIN_SSTABLE_SIZE

    protected static final long DEFAULT_MIN_SSTABLE_SIZE

See Also:
  Constant Field Values

### MIN_SSTABLE_SIZE_KEY

    protected static final java.lang.String MIN_SSTABLE_SIZE_KEY

See Also:
  Constant Field Values

### minSSTableSize

    protected long minSSTableSize

### estimatedRemainingTasks

    protected volatile int estimatedRemainingTasks

Constructor Detail

### SizeTieredCompactionStrategy

    public SizeTieredCompactionStrategy(ColumnFamilyStore cfs,
                                        java.util.Map<java.lang.String,java.lang.String> options)

Method Detail

### getNextBackgroundTask

    public AbstractCompactionTask getNextBackgroundTask(int gcBefore)

  Specified by:
    `getNextBackgroundTask` in class `AbstractCompactionStrategy`
  Parameters:
    `gcBefore` - throw away tombstones older than this
  Returns:
    the next background/minor compaction task to run; null if nothing to do.

### getMaximalTask

    public AbstractCompactionTask getMaximalTask(int gcBefore)

  Specified by:
    `getMaximalTask` in class `AbstractCompactionStrategy`
  Parameters:
    `gcBefore` - throw away tombstones older than this
  Returns:
    a compaction task that should be run to compact this columnfamilystore as much as possible. Null if nothing to do.

### getUserDefinedTask

    public AbstractCompactionTask getUserDefinedTask(java.util.Collection<SSTableReader> sstables,
                                                     int gcBefore)

  Specified by:
    `getUserDefinedTask` in class `AbstractCompactionStrategy`
    `gcBefore` - throw away tombstones older than this
  Returns:
    a compaction task corresponding to the requested sstables. Will not be null. (Will throw if user requests an invalid compaction.)

### getEstimatedRemainingTasks

    public int getEstimatedRemainingTasks()

  Specified by:
    `getEstimatedRemainingTasks` in class `AbstractCompactionStrategy`
  Returns:
    the number of background tasks estimated to still be needed for this columnfamilystore

### getMinSSTableSize

    public long getMinSSTableSize()

### getMaxSSTableSize

    public long getMaxSSTableSize()

  Specified by:
    `getMaxSSTableSize` in class `AbstractCompactionStrategy`
  Returns:
    size in bytes of the largest sstables for this strategy

### isKeyExistenceExpensive

    public boolean isKeyExistenceExpensive(java.util.Set<? extends SSTable> sstablesToIgnore)

  Specified by:
    `isKeyExistenceExpensive` in class `AbstractCompactionStrategy`
  Returns:
    true if checking for whether a key exists, ignoring @param sstablesToIgnore, is going to be expensive

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

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