|
||||||||||
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)
|
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 |
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 |
int |
getMemtableColumnsCount()
Returns the total number of columns present in the memtable. |
int |
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 |
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)
|
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 |
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 |
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 ColumnFamilyStoreMBean
public long getMaxRowSize()
ColumnFamilyStoreMBean
getMaxRowSize
in interface ColumnFamilyStoreMBean
public long getMeanRowSize()
ColumnFamilyStoreMBean
getMeanRowSize
in interface ColumnFamilyStoreMBean
public 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 java.util.concurrent.Future<?> submitRowCacheWrite()
public java.util.concurrent.Future<?> submitKeyCacheWrite()
public java.lang.String getColumnFamilyName()
getColumnFamilyName
in interface ColumnFamilyStoreMBean
public 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.InterruptedException
public 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 boolean isInvalid()
public void removeAllSSTables()
public int getMemtableColumnsCount()
ColumnFamilyStoreMBean
getMemtableColumnsCount
in interface ColumnFamilyStoreMBean
public int getMemtableDataSize()
ColumnFamilyStoreMBean
getMemtableDataSize
in interface ColumnFamilyStoreMBean
public int getMemtableSwitchCount()
ColumnFamilyStoreMBean
getMemtableSwitchCount
in interface ColumnFamilyStoreMBean
public java.util.Collection<SSTableReader> getSSTables()
public long[] getRecentSSTablesPerReadHistogram()
getRecentSSTablesPerReadHistogram
in interface ColumnFamilyStoreMBean
public long[] getSSTablesPerReadHistogram()
getSSTablesPerReadHistogram
in interface ColumnFamilyStoreMBean
public long getReadCount()
getReadCount
in interface ColumnFamilyStoreMBean
public double getRecentReadLatencyMicros()
getRecentReadLatencyMicros
in interface ColumnFamilyStoreMBean
public long[] getLifetimeReadLatencyHistogramMicros()
getLifetimeReadLatencyHistogramMicros
in interface ColumnFamilyStoreMBean
public long[] getRecentReadLatencyHistogramMicros()
getRecentReadLatencyHistogramMicros
in interface ColumnFamilyStoreMBean
public long getTotalReadLatencyMicros()
getTotalReadLatencyMicros
in interface ColumnFamilyStoreMBean
public int getPendingTasks()
getPendingTasks
in interface ColumnFamilyStoreMBean
public long getWriteCount()
getWriteCount
in interface ColumnFamilyStoreMBean
public long getTotalWriteLatencyMicros()
getTotalWriteLatencyMicros
in interface ColumnFamilyStoreMBean
public double getRecentWriteLatencyMicros()
getRecentWriteLatencyMicros
in interface ColumnFamilyStoreMBean
public long[] getLifetimeWriteLatencyHistogramMicros()
getLifetimeWriteLatencyHistogramMicros
in interface ColumnFamilyStoreMBean
public 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 ColumnFamilyStoreMBean
public long getLiveDiskSpaceUsed()
getLiveDiskSpaceUsed
in interface ColumnFamilyStoreMBean
public int getLiveSSTableCount()
getLiveSSTableCount
in interface ColumnFamilyStoreMBean
public ColumnFamily getRawCachedRow(DecoratedKey key)
public void forceMajorCompaction() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
ColumnFamilyStoreMBean
forceMajorCompaction
in interface ColumnFamilyStoreMBean
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public void invalidateRowCache()
ColumnFamilyStoreMBean
invalidateRowCache
in interface ColumnFamilyStoreMBean
public void invalidateKeyCache()
ColumnFamilyStoreMBean
invalidateKeyCache
in interface ColumnFamilyStoreMBean
public 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.IOException
public long getBloomFilterFalsePositives()
getBloomFilterFalsePositives
in interface ColumnFamilyStoreMBean
public long getRecentBloomFilterFalsePositives()
getRecentBloomFilterFalsePositives
in interface ColumnFamilyStoreMBean
public double getBloomFilterFalseRatio()
getBloomFilterFalseRatio
in interface ColumnFamilyStoreMBean
public double getRecentBloomFilterFalseRatio()
getRecentBloomFilterFalseRatio
in interface ColumnFamilyStoreMBean
public 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.Object
public int getMinimumCompactionThreshold()
ColumnFamilyStoreMBean
getMinimumCompactionThreshold
in interface ColumnFamilyStoreMBean
public void setMinimumCompactionThreshold(int minCompactionThreshold)
ColumnFamilyStoreMBean
setMinimumCompactionThreshold
in interface ColumnFamilyStoreMBean
public int getMaximumCompactionThreshold()
ColumnFamilyStoreMBean
getMaximumCompactionThreshold
in interface ColumnFamilyStoreMBean
public void setMaximumCompactionThreshold(int maxCompactionThreshold)
ColumnFamilyStoreMBean
setMaximumCompactionThreshold
in interface ColumnFamilyStoreMBean
public void disableAutoCompaction()
ColumnFamilyStoreMBean
disableAutoCompaction
in interface ColumnFamilyStoreMBean
public int getMemtableFlushAfterMins()
getMemtableFlushAfterMins
in interface ColumnFamilyStoreMBean
public void setMemtableFlushAfterMins(int time)
setMemtableFlushAfterMins
in interface ColumnFamilyStoreMBean
public int getMemtableThroughputInMB()
getMemtableThroughputInMB
in interface ColumnFamilyStoreMBean
public void setMemtableThroughputInMB(int size)
setMemtableThroughputInMB
in interface ColumnFamilyStoreMBean
public double getMemtableOperationsInMillions()
getMemtableOperationsInMillions
in interface ColumnFamilyStoreMBean
public void setMemtableOperationsInMillions(double ops)
setMemtableOperationsInMillions
in interface ColumnFamilyStoreMBean
public long estimateKeys()
estimateKeys
in interface ColumnFamilyStoreMBean
public long[] getEstimatedRowSizeHistogram()
getEstimatedRowSizeHistogram
in interface ColumnFamilyStoreMBean
public long[] getEstimatedColumnCountHistogram()
getEstimatedColumnCountHistogram
in interface ColumnFamilyStoreMBean
public boolean isIndexBuilt()
public java.util.List<java.lang.String> getBuiltIndexes()
getBuiltIndexes
in interface ColumnFamilyStoreMBean
public boolean isIndex()
public void reduceCacheSizes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |