ColumnFamilyStore (apache-cassandra API)
Date: 2012-05-04

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
Class ColumnFamilyStore

    java.lang.Object
      org.apache.cassandra.db.ColumnFamilyStore

All Implemented Interfaces:
  ColumnFamilyStoreMBean

    public class ColumnFamilyStore

extends java.lang.Object
implements ColumnFamilyStoreMBean

Nested Class Summary
`static class` | `ColumnFamilyStore.CacheType`
`static class` | `ColumnFamilyStore.ViewFragment`

Field Summary
`java.lang.String` | `columnFamily`
`java.util.concurrent.locks.Lock` | `flushLock` Lock to allow migrations to block all flushing, so we can be sure not to write orphaned data files
`SecondaryIndexManager` | `indexManager`
`java.util.concurrent.ConcurrentMap<java.nio.ByteBuffer,java.nio.ByteBuffer>` | `internedNames`
`AutoSavingCache<Pair<Descriptor,DecoratedKey>,java.lang.Long>` | `keyCache`
`CFMetaData` | `metadata`
`IPartitioner` | `partitioner`
`static java.util.concurrent.ExecutorService` | `postFlushExecutor`
`AutoSavingCache<DecoratedKey,ColumnFamily>` | `rowCache`
`Table` | `table`

Method Summary
`void` | `addSSTable(SSTableReader sstable)`
`static java.lang.Iterable<ColumnFamilyStore>` | `all()`
`java.lang.Iterable<DecoratedKey>` | `allKeySamples()`
`void` | `apply(DecoratedKey key, ColumnFamily columnFamily)` Insert/Update the column family for this key.
`void` | `clearUnsafe()` For testing.
`java.lang.Iterable<ColumnFamilyStore>` | `concatWithIndexes()`
`static ColumnFamilyStore` | `createColumnFamilyStore(Table table, java.lang.String columnFamily)`
`static ColumnFamilyStore` | `createColumnFamilyStore(Table table, java.lang.String columnFamily, IPartitioner partitioner, CFMetaData metadata)`
`SSTableWriter` | `createCompactionWriter(long estimatedRows, java.lang.String location, java.util.Collection<SSTableReader> sstables)`
`SSTableWriter` | `createFlushWriter(long estimatedRows, long estimatedSize, ReplayPosition context)`
`void` | `disableAutoCompaction()` Disable automatic compaction.
`void` | `discardSSTables(long truncatedAt)` Discard all SSTables that were created before given timestamp.
`long` | `estimateKeys()`
`void` | `forceBlockingFlush()`
`void` | `forceCleanup(NodeId.OneShotRenewer renewer)`
`java.util.concurrent.Future<?>` | `forceFlush()` Triggers an immediate memtable flush.
`void` | `forceMajorCompaction()` force a major compaction of this column family
`int` | `gcBefore()`
`long` | `getBloomFilterDiskSpaceUsed()`
`long` | `getBloomFilterFalsePositives()`
`double` | `getBloomFilterFalseRatio()`
`java.util.List<java.lang.String>` | `getBuiltIndexes()` Returns a list of the names of the built column indexes for current store
`ColumnFamily` | `getColumnFamily(DecoratedKey key, QueryPath path, java.nio.ByteBuffer start, java.nio.ByteBuffer finish, boolean reversed, int limit)`
`ColumnFamily` | `getColumnFamily(QueryFilter filter)` get a list of columns starting from a given column, in a specified order.
`ColumnFamily` | `getColumnFamily(QueryFilter filter, ISortedColumns.Factory factory)`
`java.lang.String` | `getColumnFamilyName()`
`AbstractCompactionStrategy` | `getCompactionStrategy()`
`java.lang.String` | `getCompactionStrategyClass()` Gets the compaction strategy class name
`AbstractType` | `getComparator()`
`double` | `getCompressionRatio()`
`DataTracker` | `getDataTracker()` Package protected for access from the CompactionManager.
`long[]` | `getEstimatedColumnCountHistogram()`
`long[]` | `getEstimatedRowSizeHistogram()`
`long` | `getExpectedCompactedFileSize(java.lang.Iterable<SSTableReader> sstables)`
`java.lang.String` | `getFlushPath(long estimatedSize, java.lang.String version)`
`AutoSavingCache<Pair<Descriptor,DecoratedKey>,java.lang.Long>` | `getKeyCache()`
`int` | `getKeyCacheCapacity()`
`int` | `getKeyCacheSavePeriodInSeconds()`
`int` | `getKeyCacheSize()`
`long[]` | `getLifetimeReadLatencyHistogramMicros()`
`long[]` | `getLifetimeWriteLatencyHistogramMicros()`
`long` | `getLiveDiskSpaceUsed()`
`int` | `getLiveSSTableCount()`
`int` | `getMaximumCompactionThreshold()` Gets the maximum number of sstables in queue before compaction kicks off
`long` | `getMaxRowSize()` return the size of the largest compacted row
`SSTableReader` | `getMaxSizeFile(java.lang.Iterable<SSTableReader> sstables)`
`int` | `getMeanColumns()`
`long` | `getMeanRowSize()` return the mean size of the rows compacted
`long` | `getMemtableColumnsCount()` Returns the total number of columns present in the memtable.
`long` | `getMemtableDataSize()` Returns the total amount of data stored in the memtable, including column related overhead.
`java.util.Set<Memtable>` | `getMemtablesPendingFlush()`
`int` | `getMemtableSwitchCount()` Returns the number of times that a flush has resulted in the memtable being switched out.
`int` | `getMinimumCompactionThreshold()` Gets the minimum number of sstables in queue before compaction kicks off
`long` | `getMinRowSize()` return the size of the smallest compacted row
`int` | `getPendingTasks()`
`java.util.List<Row>` | `getRangeSlice(java.nio.ByteBuffer superColumn, AbstractBounds range, int maxResults, IFilter columnFilter)` Fetch a range of rows and columns from memtables/sstables.
`ColumnFamily` | `getRawCachedRow(DecoratedKey key)` raw cached row -- does not fetch the row if it is not present.
`long` | `getReadCount()`
`long` | `getRecentBloomFilterFalsePositives()`
`double` | `getRecentBloomFilterFalseRatio()`
`long[]` | `getRecentReadLatencyHistogramMicros()`
`double` | `getRecentReadLatencyMicros()`
`long[]` | `getRecentSSTablesPerReadHistogram()`
`long[]` | `getRecentWriteLatencyHistogramMicros()`
`double` | `getRecentWriteLatencyMicros()`
`int` | `getRowCacheCapacity()`
`int` | `getRowCacheKeysToSave()`
`int` | `getRowCacheSavePeriodInSeconds()`
`int` | `getRowCacheSize()`
`java.util.Collection<SSTableReader>` | `getSSTables()`
`long[]` | `getSSTablesPerReadHistogram()`
`java.lang.String` | `getTempSSTablePath(java.lang.String directory)`
`java.lang.String` | `getTempSSTablePath(java.lang.String directory, java.lang.String version)`
`long` | `getTotalDiskSpaceUsed()`
`long` | `getTotalMemtableLiveSize()`
`long` | `getTotalReadLatencyMicros()`
`long` | `getTotalWriteLatencyMicros()`
`int` | `getUnleveledSSTables()`
`long` | `getWriteCount()`
`boolean` | `hasUnreclaimedSpace()`
`void` | `initCaches()`
`java.nio.ByteBuffer` | `internOrCopy(java.nio.ByteBuffer name, Allocator allocator)`
`void` | `invalidate()` call when dropping or renaming a CF.
`void` | `invalidateCachedRow(DecoratedKey key)`
`void` | `invalidateKeyCache()` invalidate the key cache; for use after invalidating row cache
`void` | `invalidateRowCache()` invalidate the row cache; for use after bulk loading via BinaryMemtable
`boolean` | `isCompactionDisabled()`
`boolean` | `isDropped()`
`boolean` | `isEmpty()`
`boolean` | `isIndex()` true if this CFS contains secondary index data
`boolean` | `isKeyInRemainingSSTables(DecoratedKey key, java.util.Set<? extends SSTable> sstablesToIgnore)` Uses bloom filters to check if key may be present in any sstable in this ColumnFamilyStore, minus a set of provided ones.
`boolean` | `isValid()`
`java.lang.Iterable<DecoratedKey>` | `keySamples(Range range)`
`void` | `loadNewSSTables()` #Scan through Keyspace/ColumnFamily's data directory determine which SSTables should be loaded and load them
`static void` | `loadNewSSTables(java.lang.String ksName, java.lang.String cfName)` See #`StorageService.loadNewSSTables(String, String)` for more info
`void` | `markCompacted(java.util.Collection<SSTableReader> sstables, OperationType compactionType)`
`java.util.Collection<SSTableReader>` | `markCurrentSSTablesReferenced()` Get the current sstables, acquiring references on all of them.
`ColumnFamilyStore.ViewFragment` | `markReferenced(DecoratedKey key)`
`ColumnFamilyStore.ViewFragment` | `markReferenced(DecoratedKey startWith, DecoratedKey stopAt)`
`java.nio.ByteBuffer` | `maybeIntern(java.nio.ByteBuffer name)`
`java.util.concurrent.Future<?>` | `maybeSwitchMemtable(Memtable oldMemtable, boolean writeCommitLog)` flush the given memtable and swap in a new one for its CFS, if it hasn't been frozen already.
`long` | `oldestUnflushedMemtable()` Returns the creation time of the oldest memtable not fully flushed yet.
`void` | `reduceCacheSizes()` sets each cache's maximum capacity to 75% of its current size
`void` | `reload()`
`static ColumnFamily` | `removeDeleted(ColumnFamily cf, int gcBefore)`
`static ColumnFamily` | `removeDeletedCF(ColumnFamily cf, int gcBefore)`
`static void` | `removeDeletedColumnsOnly(ColumnFamily cf, int gcBefore)`
`void` | `replaceCompactedSSTables(java.util.Collection<SSTableReader> sstables, java.lang.Iterable<SSTableReader> replacements, OperationType compactionType)`
`void` | `scheduleCacheSaving(int rowCacheSavePeriodInSeconds, int keyCacheSavePeriodInSeconds, int rowCacheKeysToSave)`
`void` | `scrub()`
`static void` | `scrubDataDirectories(java.lang.String table, java.lang.String columnFamily)` Removes unnecessary files from the cf directory at startup: these include temp files, orphans, zero-length files and compacted sstables.
`java.util.List<Row>` | `search(IndexClause clause, AbstractBounds range, IFilter dataFilter)`
`void` | `setCompactionStrategyClass(java.lang.String compactionStrategyClass)` Sets the compaction strategy by class name
`void` | `setKeyCacheSavePeriodInSeconds(int kcspis)`
`void` | `setMaximumCompactionThreshold(int maxCompactionThreshold)` Sets the maximum number of sstables in queue before compaction kicks off
`void` | `setMinimumCompactionThreshold(int minCompactionThreshold)` Sets the minimum number of sstables in queue before compaction kicks off
`void` | `setRowCacheKeysToSave(int keysToSave)`
`void` | `setRowCacheSavePeriodInSeconds(int rcspis)`
`void` | `snapshot(java.lang.String snapshotName)` Take a snap shot of this columnfamily store.
`void` | `snapshotWithoutFlush(java.lang.String snapshotName)`
`void` | `sstablesRewrite()`
`java.lang.String` | `toString()`
`java.util.concurrent.Future<?>` | `truncate()` Truncate practically deletes the entire column family's data
`void` | `updateCacheSizes()` Resizes the key and row caches based on the current key estimate.
`void` | `updateRowCache(DecoratedKey key, ColumnFamily columnFamily)`

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

Field Detail

### postFlushExecutor

    public static final java.util.concurrent.ExecutorService postFlushExecutor

### table

    public final Table table

### columnFamily

    public final java.lang.String columnFamily

### metadata

    public final CFMetaData metadata

### partitioner

    public final IPartitioner partitioner

### indexManager

    public final SecondaryIndexManager indexManager

### internedNames

    public final java.util.concurrent.ConcurrentMap<java.nio.ByteBuffer,java.nio.ByteBuffer> internedNames

### flushLock

    public final java.util.concurrent.locks.Lock flushLock

  Lock to allow migrations to block all flushing, so we can be sure not to write orphaned data files

### keyCache

    public final AutoSavingCache<Pair<Descriptor,DecoratedKey>,java.lang.Long> keyCache

### rowCache

    public final AutoSavingCache<DecoratedKey,ColumnFamily> rowCache

Method Detail

### reload

    public void reload()
                throws java.io.IOException

  Throws:
    `java.io.IOException`

### setCompactionStrategyClass

    public void setCompactionStrategyClass(java.lang.String compactionStrategyClass)
                                    throws ConfigurationException

  Description copied from interface: `ColumnFamilyStoreMBean`
  Sets the compaction strategy by class name

  Specified by:
    `setCompactionStrategyClass` in interface `ColumnFamilyStoreMBean`
  Parameters:
    `compactionStrategyClass` - the name of the compaction strategy class
  Throws:
    `ConfigurationException`

### getCompactionStrategyClass

    public java.lang.String getCompactionStrategyClass()

  Description copied from interface: `ColumnFamilyStoreMBean`
  Gets the compaction strategy class name

  Specified by:
    `getCompactionStrategyClass` in interface `ColumnFamilyStoreMBean`

### invalidate

    public void invalidate()

  call when dropping or renaming a CF. Performs mbean housekeeping and invalidates CFS to other operations

### getMinRowSize

    public long getMinRowSize()

  Description copied from interface: `ColumnFamilyStoreMBean`
  return the size of the smallest compacted row

  Specified by:
    `getMinRowSize` in interface `ColumnFamilyStoreMBean`
  Returns:

### getMaxRowSize

    public long getMaxRowSize()

  Description copied from interface: `ColumnFamilyStoreMBean`
  return the size of the largest compacted row

  Specified by:
    `getMaxRowSize` in interface `ColumnFamilyStoreMBean`
  Returns:

### getMeanRowSize

    public long getMeanRowSize()

  Description copied from interface: `ColumnFamilyStoreMBean`
  return the mean size of the rows compacted

  Specified by:
    `getMeanRowSize` in interface `ColumnFamilyStoreMBean`
  Returns:

### getMeanColumns

    public int getMeanColumns()

### createColumnFamilyStore

    public static ColumnFamilyStore createColumnFamilyStore(Table table,
                                                            java.lang.String columnFamily)

### createColumnFamilyStore

    public static ColumnFamilyStore createColumnFamilyStore(Table table,
                                                            java.lang.String columnFamily,
                                                            IPartitioner partitioner,
                                                            CFMetaData metadata)

### scrubDataDirectories

    public static void scrubDataDirectories(java.lang.String table,
                                            java.lang.String columnFamily)

  Removes unnecessary files from the cf directory at startup: these include temp files, orphans, zero-length files and compacted sstables. Files that cannot be recognized will be ignored.

### initCaches

    public void initCaches()

### scheduleCacheSaving

    public void scheduleCacheSaving(int rowCacheSavePeriodInSeconds,
                                    int keyCacheSavePeriodInSeconds,
                                    int rowCacheKeysToSave)

### getKeyCache

    public AutoSavingCache<Pair<Descriptor,DecoratedKey>,java.lang.Long> getKeyCache()

### loadNewSSTables

    public static void loadNewSSTables(java.lang.String ksName,
                                       java.lang.String cfName)

  See #`StorageService.loadNewSSTables(String, String)` for more info

  Parameters:
    `ksName` - The keyspace name
    `cfName` - The columnFamily name

### loadNewSSTables

    public void loadNewSSTables()

  #Scan through Keyspace/ColumnFamily's data directory determine which SSTables should be loaded and load them

  Specified by:
    `loadNewSSTables` in interface `ColumnFamilyStoreMBean`

### getColumnFamilyName

    public java.lang.String getColumnFamilyName()

  Specified by:
    `getColumnFamilyName` in interface `ColumnFamilyStoreMBean`
  Returns:
    the name of the column family

### getFlushPath

    public java.lang.String getFlushPath(long estimatedSize,
                                         java.lang.String version)

### getTempSSTablePath

    public java.lang.String getTempSSTablePath(java.lang.String directory,
                                               java.lang.String version)

### getTempSSTablePath

    public java.lang.String getTempSSTablePath(java.lang.String directory)

### maybeSwitchMemtable

    public java.util.concurrent.Future<?> maybeSwitchMemtable(Memtable oldMemtable,
                                                              boolean writeCommitLog)

  flush the given memtable and swap in a new one for its CFS, if it hasn't been frozen already. threadsafe.

### isDropped

    public boolean isDropped()

### forceFlush

    public java.util.concurrent.Future<?> forceFlush()

  Description copied from interface: `ColumnFamilyStoreMBean`
  Triggers an immediate memtable flush.

  Specified by:
    `forceFlush` in interface `ColumnFamilyStoreMBean`

### forceBlockingFlush

    public void forceBlockingFlush()
                            throws java.util.concurrent.ExecutionException,
                                   java.lang.InterruptedException

  Throws:
    `java.util.concurrent.ExecutionException`
    `java.lang.InterruptedException`

### updateRowCache

    public void updateRowCache(DecoratedKey key,
                               ColumnFamily columnFamily)

### apply

    public void apply(DecoratedKey key,
                      ColumnFamily columnFamily)

  Insert/Update the column family for this key. Caller is responsible for acquiring Table.flusherLock! param @ lock - lock that needs to be used. param @ key - key for update/insert param @ columnFamily - columnFamily changes

### removeDeletedCF

    public static ColumnFamily removeDeletedCF(ColumnFamily cf,
                                               int gcBefore)

### removeDeleted

    public static ColumnFamily removeDeleted(ColumnFamily cf,
                                             int gcBefore)

### removeDeletedColumnsOnly

    public static void removeDeletedColumnsOnly(ColumnFamily cf,
                                                int gcBefore)

### isKeyInRemainingSSTables

    public boolean isKeyInRemainingSSTables(DecoratedKey key,
                                            java.util.Set<? extends SSTable> sstablesToIgnore)

  Uses bloom filters to check if key may be present in any sstable in this ColumnFamilyStore, minus a set of provided ones. Because BFs are checked, negative returns ensure that the key is not present in the checked SSTables, but positive ones doesn't ensure key presence.

### addSSTable

    public void addSSTable(SSTableReader sstable)

### getExpectedCompactedFileSize

    public long getExpectedCompactedFileSize(java.lang.Iterable<SSTableReader> sstables)

### getMaxSizeFile

    public SSTableReader getMaxSizeFile(java.lang.Iterable<SSTableReader> sstables)

### forceCleanup

    public void forceCleanup(NodeId.OneShotRenewer renewer)
                      throws java.util.concurrent.ExecutionException,
                             java.lang.InterruptedException

  Throws:
    `java.util.concurrent.ExecutionException`
    `java.lang.InterruptedException`

### scrub

    public void scrub()
               throws java.util.concurrent.ExecutionException,
                      java.lang.InterruptedException

  Throws:
    `java.util.concurrent.ExecutionException`
    `java.lang.InterruptedException`

### sstablesRewrite

    public void sstablesRewrite()
                         throws java.util.concurrent.ExecutionException,
                                java.lang.InterruptedException

  Throws:
    `java.util.concurrent.ExecutionException`
    `java.lang.InterruptedException`

### markCompacted

    public void markCompacted(java.util.Collection<SSTableReader> sstables,
                              OperationType compactionType)

### replaceCompactedSSTables

    public void replaceCompactedSSTables(java.util.Collection<SSTableReader> sstables,
                                         java.lang.Iterable<SSTableReader> replacements,
                                         OperationType compactionType)

### isValid

    public boolean isValid()

### getMemtableColumnsCount

    public long getMemtableColumnsCount()

  Description copied from interface: `ColumnFamilyStoreMBean`
  Returns the total number of columns present in the memtable.

  Specified by:
    `getMemtableColumnsCount` in interface `ColumnFamilyStoreMBean`
  Returns:
    The number of columns.

### getMemtableDataSize

    public long getMemtableDataSize()

  Description copied from interface: `ColumnFamilyStoreMBean`
  Returns the total amount of data stored in the memtable, including column related overhead.

  Specified by:
    `getMemtableDataSize` in interface `ColumnFamilyStoreMBean`
  Returns:
    The size in bytes.

### getTotalMemtableLiveSize

    public long getTotalMemtableLiveSize()

### getMemtableSwitchCount

    public int getMemtableSwitchCount()

  Description copied from interface: `ColumnFamilyStoreMBean`
  Returns the number of times that a flush has resulted in the memtable being switched out.

  Specified by:
    `getMemtableSwitchCount` in interface `ColumnFamilyStoreMBean`
  Returns:
    the number of memtable switches

### getDataTracker

    public DataTracker getDataTracker()

  Package protected for access from the CompactionManager.

### getSSTables

    public java.util.Collection<SSTableReader> getSSTables()

### getRecentSSTablesPerReadHistogram

    public long[] getRecentSSTablesPerReadHistogram()

  Specified by:
    `getRecentSSTablesPerReadHistogram` in interface `ColumnFamilyStoreMBean`
  Returns:
    a histogram of the number of sstable data files accessed per read: reading this property resets it

### getSSTablesPerReadHistogram

    public long[] getSSTablesPerReadHistogram()

  Specified by:
    `getSSTablesPerReadHistogram` in interface `ColumnFamilyStoreMBean`
  Returns:
    a histogram of the number of sstable data files accessed per read

### getReadCount

    public long getReadCount()

  Specified by:
    `getReadCount` in interface `ColumnFamilyStoreMBean`
  Returns:
    the number of read operations on this column family

### getRecentReadLatencyMicros

    public double getRecentReadLatencyMicros()

  Specified by:
    `getRecentReadLatencyMicros` in interface `ColumnFamilyStoreMBean`
  Returns:
    average latency per read operation since the last call

### getLifetimeReadLatencyHistogramMicros

    public long[] getLifetimeReadLatencyHistogramMicros()

  Specified by:
    `getLifetimeReadLatencyHistogramMicros` in interface `ColumnFamilyStoreMBean`
  Returns:
    an array representing the latency histogram

### getRecentReadLatencyHistogramMicros

    public long[] getRecentReadLatencyHistogramMicros()

  Specified by:
    `getRecentReadLatencyHistogramMicros` in interface `ColumnFamilyStoreMBean`
  Returns:
    an array representing the latency histogram

### getTotalReadLatencyMicros

    public long getTotalReadLatencyMicros()

  Specified by:
    `getTotalReadLatencyMicros` in interface `ColumnFamilyStoreMBean`
  Returns:
    total read latency (divide by getReadCount() for average)

### getPendingTasks

    public int getPendingTasks()

  Specified by:
    `getPendingTasks` in interface `ColumnFamilyStoreMBean`
  Returns:
    the estimated number of tasks pending for this column family

### getWriteCount

    public long getWriteCount()

  Specified by:
    `getWriteCount` in interface `ColumnFamilyStoreMBean`
  Returns:
    the number of write operations on this column family

### getTotalWriteLatencyMicros

    public long getTotalWriteLatencyMicros()

  Specified by:
    `getTotalWriteLatencyMicros` in interface `ColumnFamilyStoreMBean`
  Returns:
    total write latency (divide by getReadCount() for average)

### getRecentWriteLatencyMicros

    public double getRecentWriteLatencyMicros()

  Specified by:
    `getRecentWriteLatencyMicros` in interface `ColumnFamilyStoreMBean`
  Returns:
    average latency per write operation since the last call

### getLifetimeWriteLatencyHistogramMicros

    public long[] getLifetimeWriteLatencyHistogramMicros()

  Specified by:
    `getLifetimeWriteLatencyHistogramMicros` in interface `ColumnFamilyStoreMBean`
  Returns:
    an array representing the latency histogram

### getRecentWriteLatencyHistogramMicros

    public long[] getRecentWriteLatencyHistogramMicros()

  Specified by:
    `getRecentWriteLatencyHistogramMicros` in interface `ColumnFamilyStoreMBean`
  Returns:
    an array representing the latency histogram

### getColumnFamily

    public ColumnFamily getColumnFamily(DecoratedKey key,
                                        QueryPath path,
                                        java.nio.ByteBuffer start,
                                        java.nio.ByteBuffer finish,
                                        boolean reversed,
                                        int limit)

### getColumnFamily

    public ColumnFamily getColumnFamily(QueryFilter filter)

  get a list of columns starting from a given column, in a specified order. only the latest version of a column is returned.

  Returns:
    null if there is no data and no tombstones; otherwise a ColumnFamily

### getColumnFamily

    public ColumnFamily getColumnFamily(QueryFilter filter,
                                        ISortedColumns.Factory factory)

### gcBefore

    public int gcBefore()

### markCurrentSSTablesReferenced

    public java.util.Collection<SSTableReader> markCurrentSSTablesReferenced()

  Get the current sstables, acquiring references on all of them. The caller is in charge of releasing the references on the sstables. See markCurrentViewReferenced() above.

### markReferenced

    public ColumnFamilyStore.ViewFragment markReferenced(DecoratedKey key)

  Returns:
    a ViewFragment containing the sstables and memtables that may need to be merged for the given @param key, according to the interval tree

### markReferenced

    public ColumnFamilyStore.ViewFragment markReferenced(DecoratedKey startWith,
                                                         DecoratedKey stopAt)

  Returns:
    a ViewFragment containing the sstables and memtables that may need to be merged for rows between @param startWith and @param stopAt, inclusive, according to the interval tree

### getRangeSlice

    public java.util.List<Row> getRangeSlice(java.nio.ByteBuffer superColumn,
                                             AbstractBounds range,
                                             int maxResults,
                                             IFilter columnFilter)

  Fetch a range of rows and columns from memtables/sstables.

  Parameters:
    `superColumn` - optional SuperColumn to slice subcolumns of; null to slice top-level columns
    `range` - Either a Bounds, which includes start key, or a Range, which does not.
    `maxResults` - Maximum rows to return
    `columnFilter` - description of the columns we're interested in for each row
  Returns:
    true if we found all keys we were looking for, otherwise false

### search

    public java.util.List<Row> search(IndexClause clause,
                                      AbstractBounds range,
                                      IFilter dataFilter)

### getComparator

    public AbstractType getComparator()

### snapshotWithoutFlush

    public void snapshotWithoutFlush(java.lang.String snapshotName)

### snapshot

    public void snapshot(java.lang.String snapshotName)

  Take a snap shot of this columnfamily store.

  Parameters:
    `snapshotName` - the name of the associated with the snapshot

### hasUnreclaimedSpace

    public boolean hasUnreclaimedSpace()

### getTotalDiskSpaceUsed

    public long getTotalDiskSpaceUsed()

  Specified by:
    `getTotalDiskSpaceUsed` in interface `ColumnFamilyStoreMBean`
  Returns:
    total disk space used by SSTables belonging to this CF, including obsolete ones waiting to be GC'd

### getLiveDiskSpaceUsed

    public long getLiveDiskSpaceUsed()

  Specified by:
    `getLiveDiskSpaceUsed` in interface `ColumnFamilyStoreMBean`
  Returns:
    disk space used by SSTables belonging to this CF

### getLiveSSTableCount

    public int getLiveSSTableCount()

  Specified by:
    `getLiveSSTableCount` in interface `ColumnFamilyStoreMBean`
  Returns:
    the number of SSTables on disk for this CF

### getRawCachedRow

    public ColumnFamily getRawCachedRow(DecoratedKey key)

  raw cached row -- does not fetch the row if it is not present. not counted in cache statistics.

### invalidateCachedRow

    public void invalidateCachedRow(DecoratedKey key)

### forceMajorCompaction

    public void forceMajorCompaction()
                              throws java.lang.InterruptedException,
                                     java.util.concurrent.ExecutionException

  Description copied from interface: `ColumnFamilyStoreMBean`
  force a major compaction of this column family

  Specified by:
    `forceMajorCompaction` in interface `ColumnFamilyStoreMBean`
  Throws:
    `java.lang.InterruptedException`
    `java.util.concurrent.ExecutionException`

### invalidateRowCache

    public void invalidateRowCache()

  Description copied from interface: `ColumnFamilyStoreMBean`
  invalidate the row cache; for use after bulk loading via BinaryMemtable

  Specified by:
    `invalidateRowCache` in interface `ColumnFamilyStoreMBean`

### invalidateKeyCache

    public void invalidateKeyCache()

  Description copied from interface: `ColumnFamilyStoreMBean`
  invalidate the key cache; for use after invalidating row cache

  Specified by:
    `invalidateKeyCache` in interface `ColumnFamilyStoreMBean`

### getRowCacheCapacity

    public int getRowCacheCapacity()

### getKeyCacheCapacity

    public int getKeyCacheCapacity()

### getRowCacheSize

    public int getRowCacheSize()

### getKeyCacheSize

    public int getKeyCacheSize()

### all

    public static java.lang.Iterable<ColumnFamilyStore> all()

### allKeySamples

    public java.lang.Iterable<DecoratedKey> allKeySamples()

### keySamples

    public java.lang.Iterable<DecoratedKey> keySamples(Range range)

### clearUnsafe

    public void clearUnsafe()

  For testing. no effort is made to clear historical memtables, nor for thread safety

### truncate

    public java.util.concurrent.Future<?> truncate()
                                            throws java.io.IOException,
                                                   java.util.concurrent.ExecutionException,
                                                   java.lang.InterruptedException

  Truncate practically deletes the entire column family's data

  Returns:
    a Future to the delete operation. Call the future's get() to make sure the column family has been deleted
  Throws:
    `java.io.IOException`
    `java.util.concurrent.ExecutionException`
    `java.lang.InterruptedException`

### getBloomFilterFalsePositives

    public long getBloomFilterFalsePositives()

  Specified by:
    `getBloomFilterFalsePositives` in interface `ColumnFamilyStoreMBean`

### getRecentBloomFilterFalsePositives

    public long getRecentBloomFilterFalsePositives()

  Specified by:
    `getRecentBloomFilterFalsePositives` in interface `ColumnFamilyStoreMBean`

### getBloomFilterFalseRatio

    public double getBloomFilterFalseRatio()

  Specified by:
    `getBloomFilterFalseRatio` in interface `ColumnFamilyStoreMBean`

### getRecentBloomFilterFalseRatio

    public double getRecentBloomFilterFalseRatio()

  Specified by:
    `getRecentBloomFilterFalseRatio` in interface `ColumnFamilyStoreMBean`

### getBloomFilterDiskSpaceUsed

    public long getBloomFilterDiskSpaceUsed()

  Specified by:
    `getBloomFilterDiskSpaceUsed` in interface `ColumnFamilyStoreMBean`

### toString

    public java.lang.String toString()

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

### disableAutoCompaction

    public void disableAutoCompaction()

  Description copied from interface: `ColumnFamilyStoreMBean`
  Disable automatic compaction.

  Specified by:
    `disableAutoCompaction` in interface `ColumnFamilyStoreMBean`

### getCompactionStrategy

    public AbstractCompactionStrategy getCompactionStrategy()

### getMinimumCompactionThreshold

    public int getMinimumCompactionThreshold()

  Description copied from interface: `ColumnFamilyStoreMBean`
  Gets the minimum number of sstables in queue before compaction kicks off

  Specified by:
    `getMinimumCompactionThreshold` in interface `ColumnFamilyStoreMBean`

### setMinimumCompactionThreshold

    public void setMinimumCompactionThreshold(int minCompactionThreshold)

  Description copied from interface: `ColumnFamilyStoreMBean`
  Sets the minimum number of sstables in queue before compaction kicks off

  Specified by:
    `setMinimumCompactionThreshold` in interface `ColumnFamilyStoreMBean`

### getMaximumCompactionThreshold

    public int getMaximumCompactionThreshold()

  Description copied from interface: `ColumnFamilyStoreMBean`
  Gets the maximum number of sstables in queue before compaction kicks off

  Specified by:
    `getMaximumCompactionThreshold` in interface `ColumnFamilyStoreMBean`

### setMaximumCompactionThreshold

    public void setMaximumCompactionThreshold(int maxCompactionThreshold)

  Description copied from interface: `ColumnFamilyStoreMBean`
  Sets the maximum number of sstables in queue before compaction kicks off

  Specified by:
    `setMaximumCompactionThreshold` in interface `ColumnFamilyStoreMBean`

### isCompactionDisabled

    public boolean isCompactionDisabled()

### getRowCacheSavePeriodInSeconds

    public int getRowCacheSavePeriodInSeconds()

  Specified by:
    `getRowCacheSavePeriodInSeconds` in interface `ColumnFamilyStoreMBean`

### setRowCacheSavePeriodInSeconds

    public void setRowCacheSavePeriodInSeconds(int rcspis)

  Specified by:
    `setRowCacheSavePeriodInSeconds` in interface `ColumnFamilyStoreMBean`

### getKeyCacheSavePeriodInSeconds

    public int getKeyCacheSavePeriodInSeconds()

  Specified by:
    `getKeyCacheSavePeriodInSeconds` in interface `ColumnFamilyStoreMBean`

### setKeyCacheSavePeriodInSeconds

    public void setKeyCacheSavePeriodInSeconds(int kcspis)

  Specified by:
    `setKeyCacheSavePeriodInSeconds` in interface `ColumnFamilyStoreMBean`

### getRowCacheKeysToSave

    public int getRowCacheKeysToSave()

  Specified by:
    `getRowCacheKeysToSave` in interface `ColumnFamilyStoreMBean`

### setRowCacheKeysToSave

    public void setRowCacheKeysToSave(int keysToSave)

  Specified by:
    `setRowCacheKeysToSave` in interface `ColumnFamilyStoreMBean`

### estimateKeys

    public long estimateKeys()

  Specified by:
    `estimateKeys` in interface `ColumnFamilyStoreMBean`

### updateCacheSizes

    public void updateCacheSizes()

  Resizes the key and row caches based on the current key estimate.

### getEstimatedRowSizeHistogram

    public long[] getEstimatedRowSizeHistogram()

  Specified by:
    `getEstimatedRowSizeHistogram` in interface `ColumnFamilyStoreMBean`

### getEstimatedColumnCountHistogram

    public long[] getEstimatedColumnCountHistogram()

  Specified by:
    `getEstimatedColumnCountHistogram` in interface `ColumnFamilyStoreMBean`

### getCompressionRatio

    public double getCompressionRatio()

  Specified by:
    `getCompressionRatio` in interface `ColumnFamilyStoreMBean`

### isIndex

    public boolean isIndex()

  true if this CFS contains secondary index data

### reduceCacheSizes

    public void reduceCacheSizes()

  sets each cache's maximum capacity to 75% of its current size

### internOrCopy

    public java.nio.ByteBuffer internOrCopy(java.nio.ByteBuffer name,
                                            Allocator allocator)

### maybeIntern

    public java.nio.ByteBuffer maybeIntern(java.nio.ByteBuffer name)

### createFlushWriter

    public SSTableWriter createFlushWriter(long estimatedRows,
                                           long estimatedSize,
                                           ReplayPosition context)
                                    throws java.io.IOException

  Throws:
    `java.io.IOException`

### createCompactionWriter

    public SSTableWriter createCompactionWriter(long estimatedRows,
                                                java.lang.String location,
                                                java.util.Collection<SSTableReader> sstables)
                                         throws java.io.IOException

  Throws:
    `java.io.IOException`

### concatWithIndexes

    public java.lang.Iterable<ColumnFamilyStore> concatWithIndexes()

### getMemtablesPendingFlush

    public java.util.Set<Memtable> getMemtablesPendingFlush()

### getBuiltIndexes

    public java.util.List<java.lang.String> getBuiltIndexes()

  Description copied from interface: `ColumnFamilyStoreMBean`
  Returns a list of the names of the built column indexes for current store

  Specified by:
    `getBuiltIndexes` in interface `ColumnFamilyStoreMBean`
  Returns:
    list of the index names

### getUnleveledSSTables

    public int getUnleveledSSTables()

  Specified by:
    `getUnleveledSSTables` in interface `ColumnFamilyStoreMBean`
  Returns:
    the number of SSTables in L0. Always return 0 if Leveled compaction is not enabled.

### oldestUnflushedMemtable

    public long oldestUnflushedMemtable()

  Returns the creation time of the oldest memtable not fully flushed yet.

### isEmpty

    public boolean isEmpty()

### discardSSTables

    public void discardSSTables(long truncatedAt)

  Discard all SSTables that were created before given timestamp. Caller is responsible to obtain compactionLock.

  Parameters:
    `truncatedAt` - The timestamp of the truncation (all SSTables before that timestamp are going be marked as compacted)

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 © 2012 The Apache Software Foundation