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 CompactionController

    java.lang.Object
      org.apache.cassandra.db.compaction.CompactionController

    public class CompactionController

extends java.lang.Object

Manage compaction options.

Field Summary
`ColumnFamilyStore` | `cfs`
`int` | `gcBefore`
`boolean` | `keyExistenceIsExpensive`
`int` | `mergeShardBefore`

Constructor Summary
`` | `CompactionController(ColumnFamilyStore cfs, java.util.Collection<SSTableReader> sstables, int gcBefore, boolean forceDeserialize)`
`protected` | `CompactionController(ColumnFamilyStore cfs, int gcBefore, boolean deserializeRequired, IntervalTree<SSTableReader> overlappingTree, boolean keyExistenceIsExpensive)`

Method Summary
`java.lang.String` | `getColumnFamily()`
`AbstractCompactedRow` | `getCompactedRow(java.util.List<SSTableIdentityIterator> rows)`
`AbstractCompactedRow` | `getCompactedRow(SSTableIdentityIterator row)` convenience method for single-sstable compactions
`java.lang.String` | `getKeyspace()`
`void` | `invalidateCachedRow(DecoratedKey key)`
`void` | `mayThrottle(long currentBytes)`
`void` | `removeDeletedInCache(DecoratedKey key)`
`boolean` | `shouldPurge(DecoratedKey key)`

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

Field Detail

### cfs

    public final ColumnFamilyStore cfs

### gcBefore

    public final int gcBefore

### keyExistenceIsExpensive

    public boolean keyExistenceIsExpensive

### mergeShardBefore

    public final int mergeShardBefore

Constructor Detail

### CompactionController

    public CompactionController(ColumnFamilyStore cfs,
                                java.util.Collection<SSTableReader> sstables,
                                int gcBefore,
                                boolean forceDeserialize)

### CompactionController

    protected CompactionController(ColumnFamilyStore cfs,
                                   int gcBefore,
                                   boolean deserializeRequired,
                                   IntervalTree<SSTableReader> overlappingTree,
                                   boolean keyExistenceIsExpensive)

Method Detail

### getKeyspace

    public java.lang.String getKeyspace()

### getColumnFamily

    public java.lang.String getColumnFamily()

### shouldPurge

    public boolean shouldPurge(DecoratedKey key)

  Returns:
    true if it's okay to drop tombstones for the given row, i.e., if we know all the verisons of the row are included in the compaction set

### invalidateCachedRow

    public void invalidateCachedRow(DecoratedKey key)

### removeDeletedInCache

    public void removeDeletedInCache(DecoratedKey key)

### getCompactedRow

    public AbstractCompactedRow getCompactedRow(java.util.List<SSTableIdentityIterator> rows)

  Returns:
    an AbstractCompactedRow implementation to write the merged rows in question. If there is a single source row, the data is from a current-version sstable, we don't need to purge and we aren't forcing deserialization for scrub, write it unchanged. Otherwise, we deserialize, purge tombstones, and reserialize in the latest version.

### getCompactedRow

    public AbstractCompactedRow getCompactedRow(SSTableIdentityIterator row)

  convenience method for single-sstable compactions

### mayThrottle

    public void mayThrottle(long currentBytes)

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