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.AbstractScanIterator`
`static class` | `ColumnFamilyStore.ViewFragment`

Field Summary
`java.lang.String` | `columnFamily`
`Directories` | `directories`
`SecondaryIndexManager` | `indexManager`
`java.util.concurrent.ConcurrentMap<java.nio.ByteBuffer,java.nio.ByteBuffer>` | `internedNames`
`CFMetaData` | `metadata`
`IPartitioner` | `partitioner`
`static java.util.concurrent.ExecutorService` | `postFlushExecutor`
`Table` | `table`

Method Summary
`void` | `addSSTable(SSTableReader sstable)`
`void` | `addSSTables(java.util.Collection<SSTableReader> sstables)`
`static java.lang.Iterable<ColumnFamilyStore>` | `all()`
`static java.util.List<ColumnFamilyStore>` | `allUserDefined()`
`void` | `apply(DecoratedKey key, ColumnFamily columnFamily)` Insert/Update the column family for this key.
`void` | `clearSnapshot(java.lang.String snapshotName)`
`void` | `clearUnsafe()` For testing.
`java.lang.Iterable<ColumnFamilyStore>` | `concatWithIndexes()`
`boolean` | `containsCachedRow(DecoratedKey key)`
`static ColumnFamilyStore` | `createColumnFamilyStore(Table table, java.lang.String columnFamily, boolean loadSSTables)`
`static ColumnFamilyStore` | `createColumnFamilyStore(Table table, java.lang.String columnFamily, IPartitioner partitioner, CFMetaData metadata)`
`SSTableWriter` | `createCompactionWriter(long estimatedRows, java.io.File 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.
`void` | `enableAutoCompaction()`
`long` | `estimateKeys()`
`java.util.List<Row>` | `filter(ColumnFamilyStore.AbstractScanIterator rowIterator, ExtendedFilter filter)`
`void` | `forceBlockingFlush()`
`void` | `forceCleanup(NodeId.OneShotRenewer renewer)`
`java.util.concurrent.Future<?>` | `forceFlush()`
`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()`
`java.util.Map<java.lang.String,java.lang.String>` | `getCompressionParameters()` Get the compression parameters
`double` | `getCompressionRatio()`
`DataTracker` | `getDataTracker()` Package protected for access from the CompactionManager.
`long[]` | `getEstimatedColumnCountHistogram()`
`long[]` | `getEstimatedRowSizeHistogram()`
`long` | `getExpectedCompactedFileSize(java.lang.Iterable<SSTableReader> sstables, OperationType operation)` Calculate expected file size of SSTable after compaction.
`java.lang.String` | `getFlushPath(long estimatedSize, java.lang.String version)`
`long[]` | `getLifetimeReadLatencyHistogramMicros()`
`long[]` | `getLifetimeWriteLatencyHistogramMicros()`
`long` | `getLiveDiskSpaceUsed()`
`int` | `getLiveSSTableCount()`
`int` | `getMaximumCompactionThreshold()` Gets the maximum number of sstables in queue before compaction kicks off
`long` | `getMaxRowSize()`
`SSTableReader` | `getMaxSizeFile(java.lang.Iterable<SSTableReader> sstables)`
`int` | `getMeanColumns()`
`long` | `getMeanRowSize()`
`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()`
`java.util.Set<SSTableReader>` | `getOverlappingSSTables(java.util.Collection<SSTableReader> sstables)`
`int` | `getPendingTasks()`
`java.util.List<Row>` | `getRangeSlice(java.nio.ByteBuffer superColumn, AbstractBounds<RowPosition> range, int maxResults, IFilter columnFilter, java.util.List<IndexExpression> rowFilter)`
`java.util.List<Row>` | `getRangeSlice(java.nio.ByteBuffer superColumn, AbstractBounds<RowPosition> range, int maxResults, IFilter columnFilter, java.util.List<IndexExpression> rowFilter, boolean maxIsColumns, boolean isPaging)`
`ColumnFamily` | `getRawCachedRow(DecoratedKey key)`
`long` | `getReadCount()`
`long` | `getRecentBloomFilterFalsePositives()`
`double` | `getRecentBloomFilterFalseRatio()`
`long[]` | `getRecentReadLatencyHistogramMicros()`
`double` | `getRecentReadLatencyMicros()`
`long[]` | `getRecentSSTablesPerReadHistogram()`
`long[]` | `getRecentWriteLatencyHistogramMicros()`
`double` | `getRecentWriteLatencyMicros()`
`ColumnFamilyStore.AbstractScanIterator` | `getSequentialIterator(java.nio.ByteBuffer superColumn, AbstractBounds<RowPosition> range, IFilter columnFilter)` Iterate over a range of rows and columns from memtables/sstables.
`java.util.List<SSTableReader>` | `getSnapshotSSTableReader(java.lang.String tag)`
`java.util.Collection<SSTableReader>` | `getSSTables()`
`java.util.List<java.lang.String>` | `getSSTablesForKey(java.lang.String key)` Returns a list of filenames that contain the given key on this node
`long[]` | `getSSTablesPerReadHistogram()`
`java.lang.String` | `getTempSSTablePath(java.io.File directory)`
`java.lang.String` | `getTempSSTablePath(java.io.File directory, java.lang.String version)`
`long` | `getTotalDiskSpaceUsed()`
`long` | `getTotalMemtableLiveSize()`
`long` | `getTotalReadLatencyMicros()`
`long` | `getTotalWriteLatencyMicros()`
`java.util.Set<SSTableReader>` | `getUncompactingSSTables()`
`int` | `getUnleveledSSTables()`
`long` | `getWriteCount()`
`boolean` | `hasUnreclaimedSpace()`
`void` | `initRowCache()`
`java.nio.ByteBuffer` | `internOrCopy(java.nio.ByteBuffer name, Allocator allocator)`
`void` | `invalidate()` call when dropping or renaming a CF.
`void` | `invalidateCachedRow(DecoratedKey key)`
`void` | `invalidateCachedRow(RowCacheKey key)`
`boolean` | `isCompactionDisabled()`
`boolean` | `isEmpty()`
`boolean` | `isIndex()` true if this CFS contains secondary index data
`boolean` | `isValid()`
`java.lang.Iterable<DecoratedKey<?>>` | `keySamples(Range<Token> 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(RowPosition startWith, RowPosition 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.
`static void` | `rebuildSecondaryIndex(java.lang.String ksName, java.lang.String cfName, java.lang.String... idxNames)`
`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` | `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(java.util.List<IndexExpression> clause, AbstractBounds<RowPosition> range, int maxResults, IFilter dataFilter)`
`java.util.List<Row>` | `search(java.util.List<IndexExpression> clause, AbstractBounds<RowPosition> range, int maxResults, IFilter dataFilter, boolean maxIsColumns)`
`void` | `setCompactionStrategyClass(java.lang.String compactionStrategyClass)` Sets the compaction strategy by class name
`void` | `setCompactionThresholds(int minThreshold, int maxThreshold)` Sets the maximum and maximum number of SSTables in queue before compaction kicks off
`void` | `setCompressionParameters(java.util.Map<java.lang.String,java.lang.String> opts)` Set the compression parameters
`void` | `setCrcCheckChance(double crcCheckChance)` Set new crc check chance
`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` | `snapshot(java.lang.String snapshotName)` Take a snap shot of this columnfamily store.
`boolean` | `snapshotExists(java.lang.String snapshotName)`
`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` | `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

### directories

    public final Directories directories

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`

### getCompressionParameters

    public java.util.Map<java.lang.String,java.lang.String> getCompressionParameters()

  Description copied from interface: `ColumnFamilyStoreMBean`
  Get the compression parameters

  Specified by:
    `getCompressionParameters` in interface `ColumnFamilyStoreMBean`

### setCompressionParameters

    public void setCompressionParameters(java.util.Map<java.lang.String,java.lang.String> opts)
                                  throws ConfigurationException

  Description copied from interface: `ColumnFamilyStoreMBean`
  Set the compression parameters

  Specified by:
    `setCompressionParameters` in interface `ColumnFamilyStoreMBean`
  Parameters:
    `opts` - map of string names to values
  Throws:
    `ConfigurationException`

### setCrcCheckChance

    public void setCrcCheckChance(double crcCheckChance)
                           throws ConfigurationException

  Description copied from interface: `ColumnFamilyStoreMBean`
  Set new crc check chance

  Specified by:
    `setCrcCheckChance` in interface `ColumnFamilyStoreMBean`
  Throws:
    `ConfigurationException`

### invalidate

    public void invalidate()

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

### getMinRowSize

    public long getMinRowSize()

  Specified by:
    `getMinRowSize` in interface `ColumnFamilyStoreMBean`
  Returns:
    the size of the smallest compacted row

### getMaxRowSize

    public long getMaxRowSize()

  Specified by:
    `getMaxRowSize` in interface `ColumnFamilyStoreMBean`
  Returns:
    the size of the largest compacted row

### getMeanRowSize

    public long getMeanRowSize()

  Specified by:
    `getMeanRowSize` in interface `ColumnFamilyStoreMBean`
  Returns:
    the size of the smallest compacted row

### getMeanColumns

    public int getMeanColumns()

### createColumnFamilyStore

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

### 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.

### initRowCache

    public void initRowCache()

### 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`

### rebuildSecondaryIndex

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

### 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.io.File directory,
                                               java.lang.String version)

### getTempSSTablePath

    public java.lang.String getTempSSTablePath(java.io.File 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.

### forceFlush

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

### 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)

### getOverlappingSSTables

    public java.util.Set<SSTableReader> getOverlappingSSTables(java.util.Collection<SSTableReader> sstables)

  Parameters:
    `sstables` -
  Returns:
    sstables whose key range overlaps with that of the given sstables, not including itself. (The given sstables may or may not overlap with each other.)

### addSSTable

    public void addSSTable(SSTableReader sstable)

### addSSTables

    public void addSSTables(java.util.Collection<SSTableReader> sstables)

### getExpectedCompactedFileSize

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

  Calculate expected file size of SSTable after compaction. If operation type is `CLEANUP` and we're not dealing with an index sstable, then we calculate expected file size with checking token range to be eliminated. Otherwise, we just add up all the files' size, which is the worst case file size for compaction of all the list of files given.

  Parameters:
    `sstables` - SSTables to calculate expected compacted file size
    `operation` - Operation type
  Returns:
    Expected file size of SSTable after compaction

### 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()

### getUncompactingSSTables

    public java.util.Set<SSTableReader> getUncompactingSSTables()

### 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(RowPosition startWith,
                                                         RowPosition 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

### getSSTablesForKey

    public java.util.List<java.lang.String> getSSTablesForKey(java.lang.String key)

  Description copied from interface: `ColumnFamilyStoreMBean`
  Returns a list of filenames that contain the given key on this node

  Specified by:
    `getSSTablesForKey` in interface `ColumnFamilyStoreMBean`
  Returns:
    list of filenames containing the key

### getSequentialIterator

    public ColumnFamilyStore.AbstractScanIterator getSequentialIterator(java.nio.ByteBuffer superColumn,
                                                                        AbstractBounds<RowPosition> range,
                                                                        IFilter columnFilter)

  Iterate over 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.
    `columnFilter` - description of the columns we're interested in for each row

### getRangeSlice

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

### getRangeSlice

    public java.util.List<Row> getRangeSlice(java.nio.ByteBuffer superColumn,
                                             AbstractBounds<RowPosition> range,
                                             int maxResults,
                                             IFilter columnFilter,
                                             java.util.List<IndexExpression> rowFilter,
                                             boolean maxIsColumns,
                                             boolean isPaging)

### search

    public java.util.List<Row> search(java.util.List<IndexExpression> clause,
                                      AbstractBounds<RowPosition> range,
                                      int maxResults,
                                      IFilter dataFilter)

### search

    public java.util.List<Row> search(java.util.List<IndexExpression> clause,
                                      AbstractBounds<RowPosition> range,
                                      int maxResults,
                                      IFilter dataFilter,
                                      boolean maxIsColumns)

### filter

    public java.util.List<Row> filter(ColumnFamilyStore.AbstractScanIterator rowIterator,
                                      ExtendedFilter filter)

### getComparator

    public AbstractType<?> getComparator()

### snapshotWithoutFlush

    public void snapshotWithoutFlush(java.lang.String snapshotName)

### getSnapshotSSTableReader

    public java.util.List<SSTableReader> getSnapshotSSTableReader(java.lang.String tag)
                                                           throws java.io.IOException

  Throws:
    `java.io.IOException`

### 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

### snapshotExists

    public boolean snapshotExists(java.lang.String snapshotName)

### clearSnapshot

    public void clearSnapshot(java.lang.String snapshotName)
                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### 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)

  Returns:
    the cached row for @param key if it is already present in the cache. That is, unlike getThroughCache, it will not readAndCache the row if it is not present, nor are these calls counted in cache statistics. Note that this WILL cause deserialization of a SerializingCache row, so if all you need to know is whether a row is present or not, use containsCachedRow instead.

### containsCachedRow

    public boolean containsCachedRow(DecoratedKey key)

  Returns:
    true if @param key is contained in the row cache

### invalidateCachedRow

    public void invalidateCachedRow(RowCacheKey key)

### 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`

### all

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

### allUserDefined

    public static java.util.List<ColumnFamilyStore> allUserDefined()

### keySamples

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

### clearUnsafe

    public void clearUnsafe()

  For testing. No effort is made to clear historical or even the current memtables, nor for thread safety. All we do is wipe the sstable containers clean, while leaving the actual data files present on disk. (This allows tests to easily call loadNewSSTables on them.)

### 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`

### enableAutoCompaction

    public void enableAutoCompaction()

### getCompactionStrategy

    public AbstractCompactionStrategy getCompactionStrategy()

### setCompactionThresholds

    public void setCompactionThresholds(int minThreshold,
                                        int maxThreshold)

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

  Specified by:
    `setCompactionThresholds` in interface `ColumnFamilyStoreMBean`

### 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()

### estimateKeys

    public long estimateKeys()

  Specified by:
    `estimateKeys` in interface `ColumnFamilyStoreMBean`

### 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

### 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.io.File 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 © 2013 The Apache Software Foundation