|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cassandra.db.ColumnFamilyStore
public class ColumnFamilyStore
| Field Summary | |
|---|---|
java.lang.String |
columnFamily
|
CFMetaData |
metadata
|
IPartitioner |
partitioner
|
static java.util.concurrent.ExecutorService |
postFlushExecutor
|
Table |
table
|
| Method Summary | |
|---|---|
void |
addIndex(ColumnDefinition info)
|
void |
addSSTable(SSTableReader sstable)
|
static java.lang.Iterable<ColumnFamilyStore> |
all()
|
java.lang.Iterable<DecoratedKey> |
allKeySamples()
|
void |
buildSecondaryIndexes(java.util.Collection<SSTableReader> sstables,
java.util.SortedSet<java.nio.ByteBuffer> columns)
|
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)
|
SSTableWriter |
createFlushWriter(long estimatedRows)
|
void |
disableAutoCompaction()
Disable automatic compaction. |
long |
estimateKeys()
|
void |
forceBlockingFlush()
|
void |
forceCleanup()
|
java.util.concurrent.Future<?> |
forceFlush()
Triggers an immediate memtable flush. |
void |
forceFlushBinary()
|
void |
forceFlushIfExpired()
|
void |
forceMajorCompaction()
force a major compaction of this column family |
int |
gcBefore()
|
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. |
java.lang.String |
getColumnFamilyName()
|
AbstractType |
getComparator()
|
long[] |
getEstimatedColumnCountHistogram()
|
long[] |
getEstimatedRowSizeHistogram()
|
java.lang.String |
getFlushPath()
|
ColumnFamilyStore |
getIndexedColumnFamilyStore(java.nio.ByteBuffer column)
|
java.util.SortedSet<java.nio.ByteBuffer> |
getIndexedColumns()
|
DecoratedKey<LocalToken> |
getIndexKeyFor(java.nio.ByteBuffer name,
java.nio.ByteBuffer value)
|
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 |
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. |
int |
getMemtableFlushAfterMins()
|
double |
getMemtableOperationsInMillions()
|
java.util.Set<Memtable> |
getMemtablesPendingFlush()
|
int |
getMemtableSwitchCount()
Returns the number of times that a flush has resulted in the memtable being switched out. |
int |
getMemtableThroughputInMB()
|
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 |
getRowCacheSavePeriodInSeconds()
|
int |
getRowCacheSize()
|
java.util.Collection<SSTableReader> |
getSSTables()
|
long[] |
getSSTablesPerReadHistogram()
|
java.lang.String |
getTempSSTablePath(java.lang.String directory)
|
long |
getTotalDiskSpaceUsed()
|
long |
getTotalReadLatencyMicros()
|
long |
getTotalWriteLatencyMicros()
|
long |
getWriteCount()
|
boolean |
hasUnreclaimedSpace()
|
void |
initRowCache()
|
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 |
isIndex()
true if this CFS contains secondary index data |
boolean |
isIndexBuilt()
Check if index is already built for current store |
boolean |
isInvalid()
|
boolean |
isKeyInRemainingSSTables(DecoratedKey key,
java.util.Set<SSTable> sstablesToIgnore)
Uses bloom filters to check if key may be present in any sstable in this ColumnFamilyStore, minus a set of provided ones. |
ColumnFamily |
newIndexedColumnFamily(java.nio.ByteBuffer column)
|
protected java.util.Set<DecoratedKey> |
readSavedCache(java.io.File path)
|
void |
reduceCacheSizes()
sets each cache's maximum capacity to 75% of its current size |
void |
reload()
|
void |
removeAllSSTables()
|
static ColumnFamily |
removeDeleted(ColumnFamily cf,
int gcBefore)
|
static ColumnFamily |
removeDeletedCF(ColumnFamily cf,
int gcBefore)
|
void |
renameSSTables(java.lang.String newCfName)
|
java.util.List<Row> |
scan(IndexClause clause,
AbstractBounds range,
IFilter dataFilter)
|
void |
scheduleCacheSaving(int rowCacheSavePeriodInSeconds,
int keyCacheSavePeriodInSeconds)
|
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. |
void |
setKeyCacheSavePeriodInSeconds(int kcspis)
|
void |
setMaximumCompactionThreshold(int maxCompactionThreshold)
Sets the maximum number of sstables in queue before compaction kicks off |
void |
setMemtableFlushAfterMins(int time)
|
void |
setMemtableOperationsInMillions(double ops)
|
void |
setMemtableThroughputInMB(int size)
|
void |
setMinimumCompactionThreshold(int minCompactionThreshold)
Sets the minimum number of sstables in queue before compaction kicks off |
void |
setRowCacheSavePeriodInSeconds(int rcspis)
|
void |
snapshot(java.lang.String snapshotName)
Take a snap shot of this columnfamily store. |
java.util.concurrent.Future<?> |
submitKeyCacheWrite()
|
java.util.concurrent.Future<?> |
submitRowCacheWrite()
|
java.lang.String |
toString()
|
java.util.concurrent.Future<?> |
truncate()
Truncate practically deletes the entire column family's data |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.util.concurrent.ExecutorService postFlushExecutor
public final Table table
public final java.lang.String columnFamily
public final IPartitioner partitioner
public final CFMetaData metadata
| Method Detail |
|---|
public void reload()
protected java.util.Set<DecoratedKey> readSavedCache(java.io.File path)
public void addIndex(ColumnDefinition info)
public void buildSecondaryIndexes(java.util.Collection<SSTableReader> sstables,
java.util.SortedSet<java.nio.ByteBuffer> columns)
public long getMinRowSize()
ColumnFamilyStoreMBean
getMinRowSize in interface ColumnFamilyStoreMBeanpublic long getMaxRowSize()
ColumnFamilyStoreMBean
getMaxRowSize in interface ColumnFamilyStoreMBeanpublic long getMeanRowSize()
ColumnFamilyStoreMBean
getMeanRowSize in interface ColumnFamilyStoreMBeanpublic int getMeanColumns()
public static ColumnFamilyStore createColumnFamilyStore(Table table,
java.lang.String columnFamily)
public static ColumnFamilyStore createColumnFamilyStore(Table table,
java.lang.String columnFamily,
IPartitioner partitioner,
CFMetaData metadata)
public static void scrubDataDirectories(java.lang.String table,
java.lang.String columnFamily)
public void initRowCache()
public void scheduleCacheSaving(int rowCacheSavePeriodInSeconds,
int keyCacheSavePeriodInSeconds)
public java.util.concurrent.Future<?> submitRowCacheWrite()
public java.util.concurrent.Future<?> submitKeyCacheWrite()
public java.lang.String getColumnFamilyName()
getColumnFamilyName in interface ColumnFamilyStoreMBeanpublic java.lang.String getFlushPath()
public java.lang.String getTempSSTablePath(java.lang.String directory)
public void forceFlushIfExpired()
public java.util.concurrent.Future<?> forceFlush()
ColumnFamilyStoreMBean
forceFlush in interface ColumnFamilyStoreMBean
public void forceBlockingFlush()
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedExceptionpublic void forceFlushBinary()
public static ColumnFamily removeDeletedCF(ColumnFamily cf,
int gcBefore)
public static ColumnFamily removeDeleted(ColumnFamily cf,
int gcBefore)
public boolean isKeyInRemainingSSTables(DecoratedKey key,
java.util.Set<SSTable> sstablesToIgnore)
public void addSSTable(SSTableReader sstable)
public void forceCleanup()
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void scrub()
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedExceptionpublic boolean isInvalid()
public void removeAllSSTables()
public long getMemtableColumnsCount()
ColumnFamilyStoreMBean
getMemtableColumnsCount in interface ColumnFamilyStoreMBeanpublic long getMemtableDataSize()
ColumnFamilyStoreMBean
getMemtableDataSize in interface ColumnFamilyStoreMBeanpublic int getMemtableSwitchCount()
ColumnFamilyStoreMBean
getMemtableSwitchCount in interface ColumnFamilyStoreMBeanpublic java.util.Collection<SSTableReader> getSSTables()
public long[] getRecentSSTablesPerReadHistogram()
getRecentSSTablesPerReadHistogram in interface ColumnFamilyStoreMBeanpublic long[] getSSTablesPerReadHistogram()
getSSTablesPerReadHistogram in interface ColumnFamilyStoreMBeanpublic long getReadCount()
getReadCount in interface ColumnFamilyStoreMBeanpublic double getRecentReadLatencyMicros()
getRecentReadLatencyMicros in interface ColumnFamilyStoreMBeanpublic long[] getLifetimeReadLatencyHistogramMicros()
getLifetimeReadLatencyHistogramMicros in interface ColumnFamilyStoreMBeanpublic long[] getRecentReadLatencyHistogramMicros()
getRecentReadLatencyHistogramMicros in interface ColumnFamilyStoreMBeanpublic long getTotalReadLatencyMicros()
getTotalReadLatencyMicros in interface ColumnFamilyStoreMBeanpublic int getPendingTasks()
getPendingTasks in interface ColumnFamilyStoreMBeanpublic long getWriteCount()
getWriteCount in interface ColumnFamilyStoreMBeanpublic long getTotalWriteLatencyMicros()
getTotalWriteLatencyMicros in interface ColumnFamilyStoreMBeanpublic double getRecentWriteLatencyMicros()
getRecentWriteLatencyMicros in interface ColumnFamilyStoreMBeanpublic long[] getLifetimeWriteLatencyHistogramMicros()
getLifetimeWriteLatencyHistogramMicros in interface ColumnFamilyStoreMBeanpublic long[] getRecentWriteLatencyHistogramMicros()
getRecentWriteLatencyHistogramMicros in interface ColumnFamilyStoreMBean
public ColumnFamily getColumnFamily(DecoratedKey key,
QueryPath path,
java.nio.ByteBuffer start,
java.nio.ByteBuffer finish,
boolean reversed,
int limit)
public ColumnFamily getColumnFamily(QueryFilter filter)
public int gcBefore()
public java.util.List<Row> getRangeSlice(java.nio.ByteBuffer superColumn,
AbstractBounds range,
int maxResults,
IFilter columnFilter)
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
superColumn - optional SuperColumn to slice subcolumns of; null to slice top-level columnsrange - Either a Bounds, which includes start key, or a Range, which does not.maxResults - Maximum rows to returncolumnFilter - description of the columns we're interested in for each row
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public java.util.List<Row> scan(IndexClause clause,
AbstractBounds range,
IFilter dataFilter)
public AbstractType getComparator()
public void snapshot(java.lang.String snapshotName)
snapshotName - the name of the associated with the snapshotpublic boolean hasUnreclaimedSpace()
public long getTotalDiskSpaceUsed()
getTotalDiskSpaceUsed in interface ColumnFamilyStoreMBeanpublic long getLiveDiskSpaceUsed()
getLiveDiskSpaceUsed in interface ColumnFamilyStoreMBeanpublic int getLiveSSTableCount()
getLiveSSTableCount in interface ColumnFamilyStoreMBeanpublic ColumnFamily getRawCachedRow(DecoratedKey key)
public void forceMajorCompaction()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
ColumnFamilyStoreMBean
forceMajorCompaction in interface ColumnFamilyStoreMBeanjava.lang.InterruptedException
java.util.concurrent.ExecutionExceptionpublic void invalidateRowCache()
ColumnFamilyStoreMBean
invalidateRowCache in interface ColumnFamilyStoreMBeanpublic void invalidateKeyCache()
ColumnFamilyStoreMBean
invalidateKeyCache in interface ColumnFamilyStoreMBeanpublic int getRowCacheCapacity()
public int getKeyCacheCapacity()
public int getRowCacheSize()
public int getKeyCacheSize()
public static java.lang.Iterable<ColumnFamilyStore> all()
public java.lang.Iterable<DecoratedKey> allKeySamples()
public java.util.Set<Memtable> getMemtablesPendingFlush()
public java.util.concurrent.Future<?> truncate()
throws java.io.IOException
java.io.IOException
public void renameSSTables(java.lang.String newCfName)
throws java.io.IOException
java.io.IOExceptionpublic long getBloomFilterFalsePositives()
getBloomFilterFalsePositives in interface ColumnFamilyStoreMBeanpublic long getRecentBloomFilterFalsePositives()
getRecentBloomFilterFalsePositives in interface ColumnFamilyStoreMBeanpublic double getBloomFilterFalseRatio()
getBloomFilterFalseRatio in interface ColumnFamilyStoreMBeanpublic double getRecentBloomFilterFalseRatio()
getRecentBloomFilterFalseRatio in interface ColumnFamilyStoreMBeanpublic java.util.SortedSet<java.nio.ByteBuffer> getIndexedColumns()
public ColumnFamilyStore getIndexedColumnFamilyStore(java.nio.ByteBuffer column)
public ColumnFamily newIndexedColumnFamily(java.nio.ByteBuffer column)
public DecoratedKey<LocalToken> getIndexKeyFor(java.nio.ByteBuffer name,
java.nio.ByteBuffer value)
public java.lang.String toString()
toString in class java.lang.Objectpublic void disableAutoCompaction()
ColumnFamilyStoreMBean
disableAutoCompaction in interface ColumnFamilyStoreMBeanpublic int getMinimumCompactionThreshold()
ColumnFamilyStoreMBean
getMinimumCompactionThreshold in interface ColumnFamilyStoreMBeanpublic void setMinimumCompactionThreshold(int minCompactionThreshold)
ColumnFamilyStoreMBean
setMinimumCompactionThreshold in interface ColumnFamilyStoreMBeanpublic int getMaximumCompactionThreshold()
ColumnFamilyStoreMBean
getMaximumCompactionThreshold in interface ColumnFamilyStoreMBeanpublic void setMaximumCompactionThreshold(int maxCompactionThreshold)
ColumnFamilyStoreMBean
setMaximumCompactionThreshold in interface ColumnFamilyStoreMBeanpublic int getMemtableFlushAfterMins()
getMemtableFlushAfterMins in interface ColumnFamilyStoreMBeanpublic void setMemtableFlushAfterMins(int time)
setMemtableFlushAfterMins in interface ColumnFamilyStoreMBeanpublic int getMemtableThroughputInMB()
getMemtableThroughputInMB in interface ColumnFamilyStoreMBean
public void setMemtableThroughputInMB(int size)
throws ConfigurationException
setMemtableThroughputInMB in interface ColumnFamilyStoreMBeanConfigurationExceptionpublic double getMemtableOperationsInMillions()
getMemtableOperationsInMillions in interface ColumnFamilyStoreMBean
public void setMemtableOperationsInMillions(double ops)
throws ConfigurationException
setMemtableOperationsInMillions in interface ColumnFamilyStoreMBeanConfigurationExceptionpublic int getRowCacheSavePeriodInSeconds()
getRowCacheSavePeriodInSeconds in interface ColumnFamilyStoreMBeanpublic void setRowCacheSavePeriodInSeconds(int rcspis)
setRowCacheSavePeriodInSeconds in interface ColumnFamilyStoreMBeanpublic int getKeyCacheSavePeriodInSeconds()
getKeyCacheSavePeriodInSeconds in interface ColumnFamilyStoreMBeanpublic void setKeyCacheSavePeriodInSeconds(int kcspis)
setKeyCacheSavePeriodInSeconds in interface ColumnFamilyStoreMBeanpublic long estimateKeys()
estimateKeys in interface ColumnFamilyStoreMBeanpublic long[] getEstimatedRowSizeHistogram()
getEstimatedRowSizeHistogram in interface ColumnFamilyStoreMBeanpublic long[] getEstimatedColumnCountHistogram()
getEstimatedColumnCountHistogram in interface ColumnFamilyStoreMBeanpublic boolean isIndexBuilt()
public java.util.List<java.lang.String> getBuiltIndexes()
getBuiltIndexes in interface ColumnFamilyStoreMBeanpublic boolean isIndex()
public void reduceCacheSizes()
public SSTableWriter createFlushWriter(long estimatedRows)
throws java.io.IOException
java.io.IOException
public SSTableWriter createCompactionWriter(long estimatedRows,
java.lang.String location)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||