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.RefViewFragment |
static class |
ColumnFamilyStore.ViewFragment |
Modifier and Type | Field and Description |
---|---|
static com.google.common.base.Function<View,java.util.List<SSTableReader>> |
CANONICAL_SSTABLES |
Directories |
directories |
static ColumnFamilyStore |
discardFlushResults |
SecondaryIndexManager |
indexManager |
Keyspace |
keyspace |
CFMetaData |
metadata |
ColumnFamilyMetrics |
metric |
java.lang.String |
name |
IPartitioner |
partitioner |
OpOrder |
readOrdering |
long |
sampleLatencyNanos |
static com.google.common.base.Function<View,java.util.List<SSTableReader>> |
UNREPAIRED_SSTABLES |
Constructor and Description |
---|
ColumnFamilyStore(Keyspace keyspace,
java.lang.String columnFamilyName,
IPartitioner partitioner,
int generation,
CFMetaData metadata,
Directories directories,
boolean loadSSTables) |
ColumnFamilyStore(Keyspace keyspace,
java.lang.String columnFamilyName,
IPartitioner partitioner,
int generation,
CFMetaData metadata,
Directories directories,
boolean loadSSTables,
boolean registerBookkeeping) |
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 |
beginLocalSampling(java.lang.String sampler,
int capacity)
begin sampling for a specific sampler with a given capacity.
|
void |
cleanupCache() |
protected static void |
clearEphemeralSnapshots(Directories directories) |
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,
CFMetaData metadata,
boolean loadSSTables) |
static ColumnFamilyStore |
createColumnFamilyStore(Keyspace keyspace,
java.lang.String columnFamily,
IPartitioner partitioner,
CFMetaData metadata,
boolean loadSSTables) |
void |
disableAutoCompaction() |
void |
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) |
javax.management.openmbean.CompositeData |
finishLocalSampling(java.lang.String sampler,
int count) |
ReplayPosition |
forceBlockingFlush() |
CompactionManager.AllSSTableOpStatus |
forceCleanup(int jobs) |
com.google.common.util.concurrent.ListenableFuture<ReplayPosition> |
forceFlush()
Flush if there is unflushed data in the memtables
|
com.google.common.util.concurrent.ListenableFuture<ReplayPosition> |
forceFlush(ReplayPosition flushIfDirtyBefore)
Flush if there is unflushed data that was written to the CommitLog before @param flushIfDirtyBefore
(inclusive).
|
void |
forceMajorCompaction() |
void |
forceMajorCompaction(boolean splitOutput)
force a major compaction of this column family
|
int |
gcBefore(long now) |
Refs<SSTableReader> |
getAndReferenceOverlappingSSTables(java.lang.Iterable<SSTableReader> sstables)
like getOverlappingSSTables, but acquires references before returning
|
static java.lang.Runnable |
getBackgroundCompactionTaskSubmitter() |
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() |
java.util.Map<java.lang.String,java.lang.String> |
getCompactionParameters() |
java.lang.String |
getCompactionParametersJson() |
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 |
getDroppableTombstoneRatio()
Get the ratio of droppable tombstones to real columns (and non-droppable tombstones)
|
long |
getExpectedCompactedFileSize(java.lang.Iterable<SSTableReader> sstables,
OperationType operation)
Calculate expected file size of SSTable after compaction.
|
static ColumnFamilyStore |
getIfExists(java.lang.String ksName,
java.lang.String cfName)
Returns a ColumnFamilyStore by ksname and cfname if it exists, null otherwise
Differently from others, this method does not throw exception if the keyspace or table does not exist.
|
static ColumnFamilyStore |
getIfExists(java.util.UUID cfId)
Returns a ColumnFamilyStore by cfId if it exists, null otherwise
Differently from others, this method does not throw exception if the table does not exist.
|
int |
getMaximumCompactionThreshold()
Gets the maximum number of sstables in queue before compaction kicks off
|
SSTableReader |
getMaxSizeFile(java.lang.Iterable<SSTableReader> sstables) |
int |
getMeanColumns() |
int |
getMinimumCompactionThreshold()
Gets the minimum number of sstables in queue before compaction kicks off
|
java.util.Collection<SSTableReader> |
getOverlappingSSTables(java.lang.Iterable<SSTableReader> sstables) |
java.lang.Iterable<SSTableReader> |
getPermittedToCompactSSTables() |
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) |
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() |
Refs<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
|
java.lang.String |
getTempSSTablePath(java.io.File directory) |
java.lang.String |
getTempSSTablePath(java.io.File directory,
SSTableFormat.Type format) |
ColumnFamily |
getTopLevelColumns(QueryFilter filter,
int gcBefore) |
Tracker |
getTracker()
Package protected for access from the CompactionManager.
|
java.util.Set<SSTableReader> |
getUncompactingSSTables() |
int |
getUnleveledSSTables() |
java.util.Set<SSTableReader> |
getUnrepairedSSTables() |
boolean |
hasUnreclaimedSpace() |
void |
invalidate()
call when dropping or renaming a CF.
|
void |
invalidate(boolean expectMBean) |
void |
invalidateCachedRow(DecoratedKey key) |
void |
invalidateCachedRow(RowCacheKey key) |
int |
invalidateCounterCache(java.util.Collection<Bounds<Token>> boundsToInvalidate) |
int |
invalidateRowCache(java.util.Collection<Bounds<Token>> boundsToInvalidate) |
boolean |
isAutoCompactionDisabled() |
boolean |
isCounterCacheEnabled() |
boolean |
isEmpty() |
boolean |
isFilterFullyCoveredBy(IDiskAtomFilter filter,
ColumnFamily cachedCf,
long now) |
boolean |
isIndex()
true if this CFS contains secondary index data
|
boolean |
isKeyCacheEnabled() |
boolean |
isRowCacheEnabled() |
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.
|
LifecycleTransaction |
markAllCompacting(OperationType operationType) |
void |
markObsolete(java.util.Collection<SSTableReader> sstables,
OperationType compactionType) |
void |
maybeUpdateRowCache(DecoratedKey key) |
void |
putCachedCounter(java.nio.ByteBuffer partitionKey,
CellName cellName,
ClockAndCount clockAndCount) |
SliceQueryFilter |
readFilterForCache() |
boolean |
rebuildOnFailedScrub(java.lang.Throwable failure)
CASSANDRA-5174 : For an index cfs we may be able to discard everything and just rebuild
the index when a scrub fails.
|
void |
rebuildSecondaryIndex(java.lang.String idxName) |
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 Tracker 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.
|
void |
resumeFlushing() |
<V> V |
runWithCompactionsDisabled(java.util.concurrent.Callable<V> callable,
boolean interruptValidation) |
CompactionManager.AllSSTableOpStatus |
scrub(boolean disableSnapshot,
boolean skipCorrupted,
boolean alwaysFail,
boolean checkData,
boolean reinsertOverflowedTTLRows,
int jobs) |
CompactionManager.AllSSTableOpStatus |
scrub(boolean disableSnapshot,
boolean skipCorrupted,
boolean checkData,
boolean reinsertOverflowedTTLRows,
int jobs) |
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<View,java.util.List<SSTableReader>> filter) |
ColumnFamilyStore.RefViewFragment |
selectAndReference(com.google.common.base.Function<View,java.util.List<SSTableReader>> filter) |
void |
setCompactionParameters(java.util.Map<java.lang.String,java.lang.String> options)
Sets the compaction parameters locally for this node
Note that this will be set until an ALTER with compaction = {..} is executed or the node is restarted
|
void |
setCompactionParametersJson(java.lang.String options)
Sets the compaction parameters locally for this node
Note that this will be set until an ALTER with compaction = {..} is executed or the node is restarted
|
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
|
static void |
shutdownExecutorsAndWait(long timeout,
java.util.concurrent.TimeUnit unit) |
static void |
shutdownPostFlushExecutor() |
void |
simulateFailedFlush() |
java.util.Set<SSTableReader> |
snapshot(java.lang.String snapshotName)
Take a snap shot of this columnfamily store.
|
java.util.Set<SSTableReader> |
snapshot(java.lang.String snapshotName,
com.google.common.base.Predicate<SSTableReader> predicate,
boolean ephemeral) |
boolean |
snapshotExists(java.lang.String snapshotName) |
void |
snapshotWithoutFlush(java.lang.String snapshotName) |
java.util.Set<SSTableReader> |
snapshotWithoutFlush(java.lang.String snapshotName,
com.google.common.base.Predicate<SSTableReader> predicate,
boolean ephemeral) |
CompactionManager.AllSSTableOpStatus |
sstablesRewrite(boolean excludeCurrentVersion,
int jobs) |
com.google.common.util.concurrent.ListenableFuture<ReplayPosition> |
switchMemtable() |
com.google.common.util.concurrent.ListenableFuture<ReplayPosition> |
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
|
void |
truncateBlocking(boolean takeSnapshot)
Truncate deletes the column family's data with no expensive tombstone creation,
optionally snapshotting the data.
|
CompactionManager.AllSSTableOpStatus |
verify(boolean extendedVerify) |
com.google.common.base.Function<View,java.util.List<SSTableReader>> |
viewFilter(AbstractBounds<RowPosition> rowBounds) |
com.google.common.base.Function<View,java.util.List<SSTableReader>> |
viewFilter(java.util.Collection<AbstractBounds<RowPosition>> rowBoundsCollection,
boolean includeRepaired) |
com.google.common.base.Function<View,java.util.List<SSTableReader>> |
viewFilter(DecoratedKey key) |
public static volatile ColumnFamilyStore discardFlushResults
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 static final com.google.common.base.Function<View,java.util.List<SSTableReader>> CANONICAL_SSTABLES
public static final com.google.common.base.Function<View,java.util.List<SSTableReader>> UNREPAIRED_SSTABLES
public ColumnFamilyStore(Keyspace keyspace, java.lang.String columnFamilyName, IPartitioner partitioner, int generation, CFMetaData metadata, Directories directories, boolean loadSSTables)
public ColumnFamilyStore(Keyspace keyspace, java.lang.String columnFamilyName, IPartitioner partitioner, int generation, CFMetaData metadata, Directories directories, boolean loadSSTables, boolean registerBookkeeping)
public static void shutdownPostFlushExecutor() throws java.lang.InterruptedException
java.lang.InterruptedException
public static void shutdownExecutorsAndWait(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException
java.lang.InterruptedException
java.util.concurrent.TimeoutException
public void reload()
public static java.lang.Runnable getBackgroundCompactionTaskSubmitter()
public void setCompactionParametersJson(java.lang.String options)
ColumnFamilyStoreMBean
setCompactionParametersJson
in interface ColumnFamilyStoreMBean
options
- compaction options with the same syntax as when doing ALTER ... WITH compaction = {..}public java.lang.String getCompactionParametersJson()
getCompactionParametersJson
in interface ColumnFamilyStoreMBean
public void setCompactionParameters(java.util.Map<java.lang.String,java.lang.String> options)
ColumnFamilyStoreMBean
setCompactionParameters
in interface ColumnFamilyStoreMBean
options
- compaction options mappublic java.util.Map<java.lang.String,java.lang.String> getCompactionParameters()
getCompactionParameters
in interface ColumnFamilyStoreMBean
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 void invalidate(boolean expectMBean)
public static ColumnFamilyStore createColumnFamilyStore(Keyspace keyspace, CFMetaData metadata, boolean loadSSTables)
public static ColumnFamilyStore createColumnFamilyStore(Keyspace keyspace, java.lang.String columnFamily, IPartitioner partitioner, CFMetaData metadata, boolean loadSSTables)
public static void scrubDataDirectories(CFMetaData metadata)
public static void removeUnfinishedCompactionLeftovers(CFMetaData metadata, java.util.Map<java.lang.Integer,java.util.UUID> unfinishedCompactions)
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 void rebuildSecondaryIndex(java.lang.String idxName)
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.lang.String getTempSSTablePath(java.io.File directory, SSTableFormat.Type format)
public com.google.common.util.concurrent.ListenableFuture<ReplayPosition> switchMemtableIfCurrent(Memtable memtable)
memtable
- public com.google.common.util.concurrent.ListenableFuture<ReplayPosition> switchMemtable()
public com.google.common.util.concurrent.ListenableFuture<ReplayPosition> forceFlush()
public com.google.common.util.concurrent.ListenableFuture<ReplayPosition> forceFlush(ReplayPosition flushIfDirtyBefore)
public ReplayPosition forceBlockingFlush()
public void simulateFailedFlush()
public void resumeFlushing()
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.Collection<SSTableReader> getOverlappingSSTables(java.lang.Iterable<SSTableReader> sstables)
sstables
- public Refs<SSTableReader> getAndReferenceOverlappingSSTables(java.lang.Iterable<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(int jobs) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public CompactionManager.AllSSTableOpStatus scrub(boolean disableSnapshot, boolean skipCorrupted, boolean checkData, boolean reinsertOverflowedTTLRows, int jobs) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public CompactionManager.AllSSTableOpStatus scrub(boolean disableSnapshot, boolean skipCorrupted, boolean alwaysFail, boolean checkData, boolean reinsertOverflowedTTLRows, int jobs) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public boolean rebuildOnFailedScrub(java.lang.Throwable failure)
public CompactionManager.AllSSTableOpStatus verify(boolean extendedVerify) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public CompactionManager.AllSSTableOpStatus sstablesRewrite(boolean excludeCurrentVersion, int jobs) 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 Tracker getTracker()
public java.util.Collection<SSTableReader> getSSTables()
public java.lang.Iterable<SSTableReader> getPermittedToCompactSSTables()
public java.util.Set<SSTableReader> getUncompactingSSTables()
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.Set<SSTableReader> getUnrepairedSSTables()
public java.util.Set<SSTableReader> getRepairedSSTables()
public ColumnFamilyStore.RefViewFragment selectAndReference(com.google.common.base.Function<View,java.util.List<SSTableReader>> filter)
public ColumnFamilyStore.ViewFragment select(com.google.common.base.Function<View,java.util.List<SSTableReader>> filter)
public com.google.common.base.Function<View,java.util.List<SSTableReader>> viewFilter(DecoratedKey key)
public com.google.common.base.Function<View,java.util.List<SSTableReader>> viewFilter(AbstractBounds<RowPosition> rowBounds)
public com.google.common.base.Function<View,java.util.List<SSTableReader>> viewFilter(java.util.Collection<AbstractBounds<RowPosition>> rowBoundsCollection, boolean includeRepaired)
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 beginLocalSampling(java.lang.String sampler, int capacity)
ColumnFamilyStoreMBean
beginLocalSampling
in interface ColumnFamilyStoreMBean
public javax.management.openmbean.CompositeData finishLocalSampling(java.lang.String sampler, int count) throws javax.management.openmbean.OpenDataException
finishLocalSampling
in interface ColumnFamilyStoreMBean
javax.management.openmbean.OpenDataException
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 java.util.Set<SSTableReader> snapshotWithoutFlush(java.lang.String snapshotName, com.google.common.base.Predicate<SSTableReader> predicate, boolean ephemeral)
ephemeral
- If this flag is set to true, the snapshot will be cleaned during next startupprotected static void clearEphemeralSnapshots(Directories directories)
public Refs<SSTableReader> getSnapshotSSTableReader(java.lang.String tag) throws java.io.IOException
java.io.IOException
public java.util.Set<SSTableReader> snapshot(java.lang.String snapshotName)
snapshotName
- the name of the associated with the snapshotpublic java.util.Set<SSTableReader> snapshot(java.lang.String snapshotName, com.google.common.base.Predicate<SSTableReader> predicate, boolean ephemeral)
ephemeral
- If this flag is set to true, the snapshot will be cleaned up during next startuppublic 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 ColumnFamily getRawCachedRow(DecoratedKey key)
public int invalidateRowCache(java.util.Collection<Bounds<Token>> boundsToInvalidate)
public int invalidateCounterCache(java.util.Collection<Bounds<Token>> boundsToInvalidate)
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
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public void forceMajorCompaction(boolean splitOutput) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
ColumnFamilyStoreMBean
forceMajorCompaction
in interface ColumnFamilyStoreMBean
splitOutput
- true if the output of the major compaction should be split in several sstablesjava.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 void truncateBlocking(boolean takeSnapshot)
takeSnapshot
- whether or not to take a snapshot true
if snapshot should be taken,
false
otherwisepublic <V> V runWithCompactionsDisabled(java.util.concurrent.Callable<V> callable, boolean interruptValidation)
public LifecycleTransaction markAllCompacting(OperationType operationType)
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 int getMeanColumns()
public long estimateKeys()
estimateKeys
in interface ColumnFamilyStoreMBean
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 boolean isEmpty()
public boolean isRowCacheEnabled()
public boolean isCounterCacheEnabled()
public boolean isKeyCacheEnabled()
public void 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
public static ColumnFamilyStore getIfExists(java.util.UUID cfId)
public static ColumnFamilyStore getIfExists(java.lang.String ksName, java.lang.String cfName)
Copyright © 2019 The Apache Software Foundation