public class ColumnFamilyStore extends java.lang.Object implements ColumnFamilyStoreMBean
Modifier and Type | Class and Description |
---|---|
static class |
ColumnFamilyStore.AbstractScanIterator |
static class |
ColumnFamilyStore.FlushLargestColumnFamily
Finds the largest memtable, as a percentage of *either* on- or off-heap memory limits, and immediately
queues it for flushing.
|
static class |
ColumnFamilyStore.ViewFragment |
Modifier and Type | Field and Description |
---|---|
Directories |
directories |
SecondaryIndexManager |
indexManager |
Keyspace |
keyspace |
CFMetaData |
metadata |
ColumnFamilyMetrics |
metric |
java.lang.String |
name |
IPartitioner |
partitioner |
static java.util.concurrent.ExecutorService |
postFlushExecutor |
OpOrder |
readOrdering |
static java.util.concurrent.ExecutorService |
reclaimExecutor |
long |
sampleLatencyNanos |
Modifier and Type | Method and Description |
---|---|
void |
addSSTable(SSTableReader sstable) |
void |
addSSTables(java.util.Collection<SSTableReader> sstables) |
static java.lang.Iterable<ColumnFamilyStore> |
all() |
void |
apply(DecoratedKey key,
ColumnFamily columnFamily,
SecondaryIndexManager.Updater indexer,
OpOrder.Group opGroup,
ReplayPosition replayPosition)
Insert/Update the column family for this key.
|
void |
cleanupCache() |
void |
clearSnapshot(java.lang.String snapshotName)
Clear all the snapshots for a given column family.
|
void |
clearUnsafe()
For testing.
|
java.lang.Iterable<ColumnFamilyStore> |
concatWithIndexes() |
boolean |
containsCachedRow(DecoratedKey key) |
static ColumnFamilyStore |
createColumnFamilyStore(Keyspace keyspace,
java.lang.String columnFamily,
boolean loadSSTables) |
static ColumnFamilyStore |
createColumnFamilyStore(Keyspace keyspace,
java.lang.String columnFamily,
IPartitioner partitioner,
CFMetaData metadata) |
void |
disableAutoCompaction() |
ReplayPosition |
discardSSTables(long truncatedAt)
Discard all SSTables that were created before given timestamp.
|
void |
enableAutoCompaction() |
void |
enableAutoCompaction(boolean waitForFutures)
used for tests - to be able to check things after a minor compaction
|
long |
estimatedKeysForRange(Range<Token> range) |
long |
estimateKeys() |
java.util.List<Row> |
filter(ColumnFamilyStore.AbstractScanIterator rowIterator,
ExtendedFilter filter) |
void |
forceBlockingFlush() |
CompactionManager.AllSSTableOpStatus |
forceCleanup() |
com.google.common.util.concurrent.ListenableFuture<?> |
forceFlush() |
com.google.common.util.concurrent.ListenableFuture<?> |
forceFlush(ReplayPosition flushIfDirtyBefore)
Flush if there is unflushed data that was written to the CommitLog before @param flushIfDirtyBefore
(inclusive).
|
void |
forceMajorCompaction()
force a major compaction of this column family
|
int |
gcBefore(long now) |
java.util.Set<SSTableReader> |
getAndReferenceOverlappingSSTables(java.util.Collection<SSTableReader> sstables)
like getOverlappingSSTables, but acquires references before returning
|
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
|
ClockAndCount |
getCachedCounter(java.nio.ByteBuffer partitionKey,
CellName cellName) |
ColumnFamily |
getColumnFamily(DecoratedKey key,
Composite start,
Composite finish,
boolean reversed,
int limit,
long timestamp) |
ColumnFamily |
getColumnFamily(QueryFilter filter)
get a list of columns starting from a given column, in a specified order.
|
java.lang.String |
getColumnFamilyName() |
AbstractCompactionStrategy |
getCompactionStrategy() |
java.lang.String |
getCompactionStrategyClass()
Gets the compaction strategy class name
|
CellNameType |
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.
|
double |
getDroppableTombstoneRatio()
Get the ratio of droppable tombstones to real columns (and non-droppable tombstones)
|
long[] |
getEstimatedColumnCountHistogram() |
long[] |
getEstimatedRowSizeHistogram() |
long |
getExpectedCompactedFileSize(java.lang.Iterable<SSTableReader> sstables,
OperationType operation)
Calculate expected file size of SSTable after compaction.
|
long[] |
getLifetimeReadLatencyHistogramMicros() |
long[] |
getLifetimeWriteLatencyHistogramMicros() |
double |
getLiveCellsPerSlice()
Number of live cells retreived during the last slicequery
|
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.
|
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(AbstractBounds<RowPosition> range,
java.util.List<IndexExpression> rowFilter,
IDiskAtomFilter columnFilter,
int maxResults) |
java.util.List<Row> |
getRangeSlice(AbstractBounds<RowPosition> range,
java.util.List<IndexExpression> rowFilter,
IDiskAtomFilter columnFilter,
int maxResults,
long now) |
java.util.List<Row> |
getRangeSlice(AbstractBounds<RowPosition> range,
java.util.List<IndexExpression> rowFilter,
IDiskAtomFilter columnFilter,
int maxResults,
long now,
boolean countCQL3Rows,
boolean isPaging) |
java.util.List<Row> |
getRangeSlice(ExtendedFilter filter) |
ColumnFamily |
getRawCachedRow(DecoratedKey key) |
long |
getReadCount() |
long |
getRecentBloomFilterFalsePositives() |
double |
getRecentBloomFilterFalseRatio() |
long[] |
getRecentReadLatencyHistogramMicros() |
double |
getRecentReadLatencyMicros() |
long[] |
getRecentSSTablesPerReadHistogram() |
long[] |
getRecentWriteLatencyHistogramMicros() |
double |
getRecentWriteLatencyMicros() |
java.util.Set<SSTableReader> |
getRepairedSSTables() |
long |
getSnapshotCreationTime(java.lang.String snapshotName) |
java.util.Map<java.lang.String,Pair<java.lang.Long,java.lang.Long>> |
getSnapshotDetails() |
java.util.List<SSTableReader> |
getSnapshotSSTableReader(java.lang.String tag) |
int[] |
getSSTableCountPerLevel() |
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) |
double |
getTombstonesPerSlice()
Number of tombstoned cells retreived during the last slicequery
|
ColumnFamily |
getTopLevelColumns(QueryFilter filter,
int gcBefore) |
long |
getTotalDiskSpaceUsed() |
long |
getTotalReadLatencyMicros() |
long |
getTotalWriteLatencyMicros() |
java.util.Set<SSTableReader> |
getUncompactingSSTables() |
int |
getUnleveledSSTables() |
java.util.Set<SSTableReader> |
getUnrepairedSSTables() |
long |
getWriteCount() |
boolean |
hasUnreclaimedSpace() |
void |
initCounterCache() |
void |
initRowCache() |
void |
invalidate()
call when dropping or renaming a CF.
|
void |
invalidateCachedRow(DecoratedKey key) |
void |
invalidateCachedRow(RowCacheKey key) |
boolean |
isAutoCompactionDisabled() |
boolean |
isEmpty() |
boolean |
isFilterFullyCoveredBy(IDiskAtomFilter filter,
ColumnFamily cachedCf,
long now) |
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 |
ExtendedFilter |
makeExtendedFilter(AbstractBounds<RowPosition> range,
IDiskAtomFilter columnFilter,
java.util.List<IndexExpression> rowFilter,
int maxResults,
boolean countCQL3Rows,
boolean isPaging,
long timestamp) |
ExtendedFilter |
makeExtendedFilter(AbstractBounds<RowPosition> keyRange,
SliceQueryFilter columnRange,
Composite columnStart,
Composite columnStop,
java.util.List<IndexExpression> rowFilter,
int maxResults,
boolean countCQL3Rows,
long now)
Allows generic range paging with the slice column filter.
|
java.lang.Iterable<SSTableReader> |
markAllCompacting() |
java.util.Collection<SSTableReader> |
markCurrentSSTablesReferenced()
Get the current sstables, acquiring references on all of them.
|
void |
markObsolete(java.util.Collection<SSTableReader> sstables,
OperationType compactionType) |
void |
maybeUpdateRowCache(DecoratedKey key) |
long |
oldestUnflushedMemtable()
Returns the creation time of the oldest memtable not fully flushed yet.
|
void |
putCachedCounter(java.nio.ByteBuffer partitionKey,
CellName cellName,
ClockAndCount clockAndCount) |
SliceQueryFilter |
readFilterForCache() |
static void |
rebuildSecondaryIndex(java.lang.String ksName,
java.lang.String cfName,
java.lang.String... idxNames) |
void |
reload() |
static ColumnFamily |
removeDeleted(ColumnFamily cf,
int gcBefore)
Removes deleted columns and purges gc-able tombstones.
|
static ColumnFamily |
removeDeleted(ColumnFamily cf,
int gcBefore,
SecondaryIndexManager.Updater indexer) |
static ColumnFamily |
removeDeletedCF(ColumnFamily cf,
int gcBefore)
Purges gc-able top-level and range tombstones, returning `cf` if there are any columns or tombstones left,
null otherwise.
|
static ColumnFamily |
removeDeletedColumnsOnly(ColumnFamily cf,
int gcBefore,
SecondaryIndexManager.Updater indexer)
Removes only per-cell tombstones, cells that are shadowed by a row-level or range tombstone, or
columns that have been dropped from the schema (for CQL3 tables only).
|
static void |
removeUnfinishedCompactionLeftovers(CFMetaData metadata,
java.util.Map<java.lang.Integer,java.util.UUID> unfinishedCompactions)
Replacing compacted sstables is atomic as far as observers of DataTracker are concerned, but not on the
filesystem: first the new sstables are renamed to "live" status (i.e., the tmp marker is removed), then
their ancestors are removed.
|
<V> V |
runWithCompactionsDisabled(java.util.concurrent.Callable<V> callable,
boolean interruptValidation) |
CompactionManager.AllSSTableOpStatus |
scrub(boolean disableSnapshot,
boolean skipCorrupted) |
static void |
scrubDataDirectories(CFMetaData metadata)
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(AbstractBounds<RowPosition> range,
java.util.List<IndexExpression> clause,
IDiskAtomFilter dataFilter,
int maxResults) |
java.util.List<Row> |
search(AbstractBounds<RowPosition> range,
java.util.List<IndexExpression> clause,
IDiskAtomFilter dataFilter,
int maxResults,
long now) |
java.util.List<Row> |
search(ExtendedFilter filter) |
ColumnFamilyStore.ViewFragment |
select(com.google.common.base.Function<DataTracker.View,java.util.List<SSTableReader>> filter) |
ColumnFamilyStore.ViewFragment |
selectAndReference(com.google.common.base.Function<DataTracker.View,java.util.List<SSTableReader>> filter) |
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.
|
void |
snapshot(java.lang.String snapshotName,
com.google.common.base.Predicate<SSTableReader> predicate) |
boolean |
snapshotExists(java.lang.String snapshotName) |
void |
snapshotWithoutFlush(java.lang.String snapshotName) |
void |
snapshotWithoutFlush(java.lang.String snapshotName,
com.google.common.base.Predicate<SSTableReader> predicate) |
CompactionManager.AllSSTableOpStatus |
sstablesRewrite(boolean excludeCurrentVersion) |
com.google.common.util.concurrent.ListenableFuture<?> |
switchMemtable() |
java.util.concurrent.Future<?> |
switchMemtableIfCurrent(Memtable memtable)
Switches the memtable iff the live memtable is the one provided
|
java.lang.String |
toString() |
long |
trueSnapshotsSize() |
void |
truncateBlocking()
Truncate deletes the entire column family's data with no expensive tombstone creation
|
com.google.common.base.Function<DataTracker.View,java.util.List<SSTableReader>> |
viewFilter(AbstractBounds<RowPosition> rowBounds) |
com.google.common.base.Function<DataTracker.View,java.util.List<SSTableReader>> |
viewFilter(java.util.Collection<AbstractBounds<RowPosition>> rowBoundsCollection) |
com.google.common.base.Function<DataTracker.View,java.util.List<SSTableReader>> |
viewFilter(DecoratedKey key) |
public static final java.util.concurrent.ExecutorService postFlushExecutor
public static final java.util.concurrent.ExecutorService reclaimExecutor
public final Keyspace keyspace
public final java.lang.String name
public final CFMetaData metadata
public final IPartitioner partitioner
public final OpOrder readOrdering
public final SecondaryIndexManager indexManager
public final Directories directories
public final ColumnFamilyMetrics metric
public volatile long sampleLatencyNanos
public void reload()
public void setCompactionStrategyClass(java.lang.String compactionStrategyClass)
ColumnFamilyStoreMBean
setCompactionStrategyClass
in interface ColumnFamilyStoreMBean
compactionStrategyClass
- the name of the compaction strategy classpublic java.lang.String getCompactionStrategyClass()
ColumnFamilyStoreMBean
getCompactionStrategyClass
in interface ColumnFamilyStoreMBean
public java.util.Map<java.lang.String,java.lang.String> getCompressionParameters()
ColumnFamilyStoreMBean
getCompressionParameters
in interface ColumnFamilyStoreMBean
public void setCompressionParameters(java.util.Map<java.lang.String,java.lang.String> opts)
ColumnFamilyStoreMBean
setCompressionParameters
in interface ColumnFamilyStoreMBean
opts
- map of string names to valuespublic void setCrcCheckChance(double crcCheckChance)
ColumnFamilyStoreMBean
setCrcCheckChance
in interface ColumnFamilyStoreMBean
public void invalidate()
public long getMinRowSize()
getMinRowSize
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.minRowSize
public long getMaxRowSize()
getMaxRowSize
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.maxRowSize
public long getMeanRowSize()
getMeanRowSize
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.meanRowSize
public int getMeanColumns()
public static ColumnFamilyStore createColumnFamilyStore(Keyspace keyspace, java.lang.String columnFamily, boolean loadSSTables)
public static ColumnFamilyStore createColumnFamilyStore(Keyspace keyspace, java.lang.String columnFamily, IPartitioner partitioner, CFMetaData metadata)
public static void scrubDataDirectories(CFMetaData metadata)
public static void removeUnfinishedCompactionLeftovers(CFMetaData metadata, java.util.Map<java.lang.Integer,java.util.UUID> unfinishedCompactions)
public void initRowCache()
public void initCounterCache()
public static void loadNewSSTables(java.lang.String ksName, java.lang.String cfName)
StorageService.loadNewSSTables(String, String)
for more infoksName
- The keyspace namecfName
- The columnFamily namepublic void loadNewSSTables()
loadNewSSTables
in interface ColumnFamilyStoreMBean
public static void rebuildSecondaryIndex(java.lang.String ksName, java.lang.String cfName, java.lang.String... idxNames)
public java.lang.String getColumnFamilyName()
getColumnFamilyName
in interface ColumnFamilyStoreMBean
public java.lang.String getTempSSTablePath(java.io.File directory)
public java.util.concurrent.Future<?> switchMemtableIfCurrent(Memtable memtable)
memtable
- public com.google.common.util.concurrent.ListenableFuture<?> switchMemtable()
public com.google.common.util.concurrent.ListenableFuture<?> forceFlush()
public com.google.common.util.concurrent.ListenableFuture<?> forceFlush(ReplayPosition flushIfDirtyBefore)
public void forceBlockingFlush()
public void maybeUpdateRowCache(DecoratedKey key)
public void apply(DecoratedKey key, ColumnFamily columnFamily, SecondaryIndexManager.Updater indexer, OpOrder.Group opGroup, ReplayPosition replayPosition)
public static ColumnFamily removeDeletedCF(ColumnFamily cf, int gcBefore)
gcBefore
- a timestamp (in seconds); tombstones with a localDeletionTime before this will be purgedpublic static ColumnFamily removeDeleted(ColumnFamily cf, int gcBefore)
public static ColumnFamily removeDeleted(ColumnFamily cf, int gcBefore, SecondaryIndexManager.Updater indexer)
public static ColumnFamily removeDeletedColumnsOnly(ColumnFamily cf, int gcBefore, SecondaryIndexManager.Updater indexer)
public java.util.Set<SSTableReader> getOverlappingSSTables(java.util.Collection<SSTableReader> sstables)
sstables
- public java.util.Set<SSTableReader> getAndReferenceOverlappingSSTables(java.util.Collection<SSTableReader> sstables)
public void addSSTable(SSTableReader sstable)
public void addSSTables(java.util.Collection<SSTableReader> sstables)
public long getExpectedCompactedFileSize(java.lang.Iterable<SSTableReader> sstables, OperationType operation)
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.sstables
- SSTables to calculate expected compacted file sizeoperation
- Operation typepublic SSTableReader getMaxSizeFile(java.lang.Iterable<SSTableReader> sstables)
public CompactionManager.AllSSTableOpStatus forceCleanup() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public CompactionManager.AllSSTableOpStatus scrub(boolean disableSnapshot, boolean skipCorrupted) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public CompactionManager.AllSSTableOpStatus sstablesRewrite(boolean excludeCurrentVersion) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void markObsolete(java.util.Collection<SSTableReader> sstables, OperationType compactionType)
public boolean isValid()
public long getMemtableColumnsCount()
ColumnFamilyStoreMBean
getMemtableColumnsCount
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.memtableColumnsCount
public long getMemtableDataSize()
ColumnFamilyStoreMBean
getMemtableDataSize
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.memtableOnHeapSize
public int getMemtableSwitchCount()
ColumnFamilyStoreMBean
getMemtableSwitchCount
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.memtableSwitchCount
public DataTracker getDataTracker()
public java.util.Collection<SSTableReader> getSSTables()
public java.util.Set<SSTableReader> getUncompactingSSTables()
public long[] getRecentSSTablesPerReadHistogram()
getRecentSSTablesPerReadHistogram
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.recentSSTablesPerRead
public long[] getSSTablesPerReadHistogram()
getSSTablesPerReadHistogram
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.sstablesPerReadHistogram
public long getReadCount()
getReadCount
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.readLatency
public double getRecentReadLatencyMicros()
getRecentReadLatencyMicros
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.readLatency
public long[] getLifetimeReadLatencyHistogramMicros()
getLifetimeReadLatencyHistogramMicros
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.readLatency
public long[] getRecentReadLatencyHistogramMicros()
getRecentReadLatencyHistogramMicros
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.readLatency
public long getTotalReadLatencyMicros()
getTotalReadLatencyMicros
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.readLatency
public int getPendingTasks()
getPendingTasks
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.pendingFlushes
public long getWriteCount()
getWriteCount
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.writeLatency
public long getTotalWriteLatencyMicros()
getTotalWriteLatencyMicros
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.writeLatency
public double getRecentWriteLatencyMicros()
getRecentWriteLatencyMicros
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.writeLatency
public long[] getLifetimeWriteLatencyHistogramMicros()
getLifetimeWriteLatencyHistogramMicros
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.writeLatency
public long[] getRecentWriteLatencyHistogramMicros()
getRecentWriteLatencyHistogramMicros
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.writeLatency
public ColumnFamily getColumnFamily(DecoratedKey key, Composite start, Composite finish, boolean reversed, int limit, long timestamp)
public SliceQueryFilter readFilterForCache()
public boolean isFilterFullyCoveredBy(IDiskAtomFilter filter, ColumnFamily cachedCf, long now)
public int gcBefore(long now)
public ColumnFamily getColumnFamily(QueryFilter filter)
public java.util.Collection<SSTableReader> markCurrentSSTablesReferenced()
public java.util.Set<SSTableReader> getUnrepairedSSTables()
public java.util.Set<SSTableReader> getRepairedSSTables()
public ColumnFamilyStore.ViewFragment selectAndReference(com.google.common.base.Function<DataTracker.View,java.util.List<SSTableReader>> filter)
public ColumnFamilyStore.ViewFragment select(com.google.common.base.Function<DataTracker.View,java.util.List<SSTableReader>> filter)
public com.google.common.base.Function<DataTracker.View,java.util.List<SSTableReader>> viewFilter(DecoratedKey key)
public com.google.common.base.Function<DataTracker.View,java.util.List<SSTableReader>> viewFilter(AbstractBounds<RowPosition> rowBounds)
public com.google.common.base.Function<DataTracker.View,java.util.List<SSTableReader>> viewFilter(java.util.Collection<AbstractBounds<RowPosition>> rowBoundsCollection)
public java.util.List<java.lang.String> getSSTablesForKey(java.lang.String key)
ColumnFamilyStoreMBean
getSSTablesForKey
in interface ColumnFamilyStoreMBean
public ColumnFamily getTopLevelColumns(QueryFilter filter, int gcBefore)
public void cleanupCache()
public java.util.List<Row> getRangeSlice(AbstractBounds<RowPosition> range, java.util.List<IndexExpression> rowFilter, IDiskAtomFilter columnFilter, int maxResults)
public java.util.List<Row> getRangeSlice(AbstractBounds<RowPosition> range, java.util.List<IndexExpression> rowFilter, IDiskAtomFilter columnFilter, int maxResults, long now)
public ExtendedFilter makeExtendedFilter(AbstractBounds<RowPosition> keyRange, SliceQueryFilter columnRange, Composite columnStart, Composite columnStop, java.util.List<IndexExpression> rowFilter, int maxResults, boolean countCQL3Rows, long now)
public java.util.List<Row> getRangeSlice(AbstractBounds<RowPosition> range, java.util.List<IndexExpression> rowFilter, IDiskAtomFilter columnFilter, int maxResults, long now, boolean countCQL3Rows, boolean isPaging)
public ExtendedFilter makeExtendedFilter(AbstractBounds<RowPosition> range, IDiskAtomFilter columnFilter, java.util.List<IndexExpression> rowFilter, int maxResults, boolean countCQL3Rows, boolean isPaging, long timestamp)
public java.util.List<Row> getRangeSlice(ExtendedFilter filter)
public java.util.List<Row> search(AbstractBounds<RowPosition> range, java.util.List<IndexExpression> clause, IDiskAtomFilter dataFilter, int maxResults)
public java.util.List<Row> search(AbstractBounds<RowPosition> range, java.util.List<IndexExpression> clause, IDiskAtomFilter dataFilter, int maxResults, long now)
public java.util.List<Row> search(ExtendedFilter filter)
public java.util.List<Row> filter(ColumnFamilyStore.AbstractScanIterator rowIterator, ExtendedFilter filter)
public CellNameType getComparator()
public void snapshotWithoutFlush(java.lang.String snapshotName)
public void snapshotWithoutFlush(java.lang.String snapshotName, com.google.common.base.Predicate<SSTableReader> predicate)
public java.util.List<SSTableReader> getSnapshotSSTableReader(java.lang.String tag) throws java.io.IOException
java.io.IOException
public void snapshot(java.lang.String snapshotName)
snapshotName
- the name of the associated with the snapshotpublic void snapshot(java.lang.String snapshotName, com.google.common.base.Predicate<SSTableReader> predicate)
public boolean snapshotExists(java.lang.String snapshotName)
public long getSnapshotCreationTime(java.lang.String snapshotName)
public void clearSnapshot(java.lang.String snapshotName)
snapshotName
- the user supplied snapshot name. If left empty,
all the snapshots will be cleaned.public java.util.Map<java.lang.String,Pair<java.lang.Long,java.lang.Long>> getSnapshotDetails()
public boolean hasUnreclaimedSpace()
public long getTotalDiskSpaceUsed()
getTotalDiskSpaceUsed
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.totalDiskSpaceUsed
public long getLiveDiskSpaceUsed()
getLiveDiskSpaceUsed
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.liveDiskSpaceUsed
public int getLiveSSTableCount()
getLiveSSTableCount
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.liveSSTableCount
public ColumnFamily getRawCachedRow(DecoratedKey key)
public boolean containsCachedRow(DecoratedKey key)
public void invalidateCachedRow(RowCacheKey key)
public void invalidateCachedRow(DecoratedKey key)
public ClockAndCount getCachedCounter(java.nio.ByteBuffer partitionKey, CellName cellName)
public void putCachedCounter(java.nio.ByteBuffer partitionKey, CellName cellName, ClockAndCount clockAndCount)
public void forceMajorCompaction() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
ColumnFamilyStoreMBean
forceMajorCompaction
in interface ColumnFamilyStoreMBean
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public static java.lang.Iterable<ColumnFamilyStore> all()
public java.lang.Iterable<DecoratedKey> keySamples(Range<Token> range)
public void clearUnsafe()
public void truncateBlocking()
public <V> V runWithCompactionsDisabled(java.util.concurrent.Callable<V> callable, boolean interruptValidation)
public java.lang.Iterable<SSTableReader> markAllCompacting()
public long getBloomFilterFalsePositives()
getBloomFilterFalsePositives
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.bloomFilterFalsePositives
public long getRecentBloomFilterFalsePositives()
getRecentBloomFilterFalsePositives
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.recentBloomFilterFalsePositives
public double getBloomFilterFalseRatio()
getBloomFilterFalseRatio
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.bloomFilterFalseRatio
public double getRecentBloomFilterFalseRatio()
getRecentBloomFilterFalseRatio
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.recentBloomFilterFalseRatio
public long getBloomFilterDiskSpaceUsed()
getBloomFilterDiskSpaceUsed
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.bloomFilterDiskSpaceUsed
public java.lang.String toString()
toString
in class java.lang.Object
public void disableAutoCompaction()
public void enableAutoCompaction()
public void enableAutoCompaction(boolean waitForFutures)
waitForFutures
- if we should block until autocompaction is donepublic boolean isAutoCompactionDisabled()
isAutoCompactionDisabled
in interface ColumnFamilyStoreMBean
public AbstractCompactionStrategy getCompactionStrategy()
public void setCompactionThresholds(int minThreshold, int maxThreshold)
ColumnFamilyStoreMBean
setCompactionThresholds
in interface ColumnFamilyStoreMBean
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 double getTombstonesPerSlice()
ColumnFamilyStoreMBean
getTombstonesPerSlice
in interface ColumnFamilyStoreMBean
public double getLiveCellsPerSlice()
ColumnFamilyStoreMBean
getLiveCellsPerSlice
in interface ColumnFamilyStoreMBean
public long estimateKeys()
estimateKeys
in interface ColumnFamilyStoreMBean
public long[] getEstimatedRowSizeHistogram()
getEstimatedRowSizeHistogram
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.estimatedRowSizeHistogram
public long[] getEstimatedColumnCountHistogram()
getEstimatedColumnCountHistogram
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.estimatedColumnCountHistogram
public double getCompressionRatio()
getCompressionRatio
in interface ColumnFamilyStoreMBean
ColumnFamilyMetrics.compressionRatio
public boolean isIndex()
public java.lang.Iterable<ColumnFamilyStore> concatWithIndexes()
public java.util.List<java.lang.String> getBuiltIndexes()
ColumnFamilyStoreMBean
getBuiltIndexes
in interface ColumnFamilyStoreMBean
public int getUnleveledSSTables()
getUnleveledSSTables
in interface ColumnFamilyStoreMBean
public int[] getSSTableCountPerLevel()
getSSTableCountPerLevel
in interface ColumnFamilyStoreMBean
public long oldestUnflushedMemtable()
public boolean isEmpty()
public ReplayPosition discardSSTables(long truncatedAt)
truncatedAt
- The timestamp of the truncation
(all SSTables before that timestamp are going be marked as compacted)public double getDroppableTombstoneRatio()
ColumnFamilyStoreMBean
getDroppableTombstoneRatio
in interface ColumnFamilyStoreMBean
public long trueSnapshotsSize()
trueSnapshotsSize
in interface ColumnFamilyStoreMBean
Copyright © 2014 The Apache Software Foundation