public class ColumnFamilyStore extends java.lang.Object implements ColumnFamilyStoreMBean
Modifier and Type | Class and Description |
---|---|
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 |
---|---|
SecondaryIndexManager |
indexManager |
Keyspace |
keyspace |
CFMetaData |
metadata |
TableMetrics |
metric |
java.lang.String |
name |
OpOrder |
readOrdering |
long |
sampleLatencyNanos |
static java.lang.String |
SNAPSHOT_DROP_PREFIX |
static java.lang.String |
SNAPSHOT_TRUNCATE_PREFIX |
TableViews |
viewManager |
Constructor and Description |
---|
ColumnFamilyStore(Keyspace keyspace,
java.lang.String columnFamilyName,
int generation,
CFMetaData metadata,
Directories directories,
boolean loadSSTables,
boolean registerBookeeping,
boolean offline) |
Modifier and Type | Method and Description |
---|---|
static void |
addInitialDirectories(Directories.DataDirectory[] newDirectories)
A hook to add additional directories to initialDirectories.
|
void |
addSSTable(SSTableReader sstable) |
void |
addSSTables(java.util.Collection<SSTableReader> sstables) |
static java.lang.Iterable<ColumnFamilyStore> |
all() |
void |
apply(PartitionUpdate update,
UpdateTransaction indexer,
OpOrder.Group opGroup,
CommitLogPosition commitLogPosition)
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.
|
void |
compactionDiskSpaceCheck(boolean enable) |
java.lang.Iterable<ColumnFamilyStore> |
concatWithIndexes() |
boolean |
containsCachedParition(DecoratedKey key) |
static ColumnFamilyStore |
createColumnFamilyStore(Keyspace keyspace,
CFMetaData metadata,
boolean loadSSTables) |
static ColumnFamilyStore |
createColumnFamilyStore(Keyspace keyspace,
java.lang.String columnFamily,
CFMetaData metadata,
boolean loadSSTables) |
static ColumnFamilyStore |
createColumnFamilyStore(Keyspace keyspace,
java.lang.String columnFamily,
CFMetaData metadata,
Directories directories,
boolean loadSSTables,
boolean registerBookkeeping,
boolean offline)
This is only directly used by offline tools
|
SSTableMultiWriter |
createSSTableMultiWriter(Descriptor descriptor,
long keyCount,
long repairedAt,
int sstableLevel,
SerializationHeader header,
LifecycleTransaction txn) |
SSTableMultiWriter |
createSSTableMultiWriter(Descriptor descriptor,
long keyCount,
long repairedAt,
MetadataCollector metadataCollector,
SerializationHeader header,
LifecycleTransaction txn) |
DecoratedKey |
decorateKey(java.nio.ByteBuffer key) |
void |
disableAutoCompaction() |
void |
discardSSTables(long truncatedAt)
Discard all SSTables that were created before given timestamp.
|
java.util.concurrent.Future<CommitLogPosition> |
dumpMemtable()
Drops current memtable without flushing to disk.
|
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() |
javax.management.openmbean.CompositeData |
finishLocalSampling(java.lang.String sampler,
int count) |
CommitLogPosition |
forceBlockingFlush() |
CompactionManager.AllSSTableOpStatus |
forceCleanup(int jobs) |
void |
forceCompactionForTokenRange(java.util.Collection<Range<Token>> tokenRanges)
force a major compaction of specified key range in this column family
|
com.google.common.util.concurrent.ListenableFuture<CommitLogPosition> |
forceFlush()
Flush if there is unflushed data in the memtables
|
com.google.common.util.concurrent.ListenableFuture<?> |
forceFlush(CommitLogPosition 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
|
CompactionManager.AllSSTableOpStatus |
garbageCollect(CompactionParams.TombstoneOption tombstoneOption,
int jobs) |
int |
gcBefore(int nowInSec) |
Refs<SSTableReader> |
getAndReferenceOverlappingLiveSSTables(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,
Clustering clustering,
ColumnDefinition column,
CellPath path) |
java.lang.String |
getColumnFamilyName()
Deprecated.
|
java.util.Map<java.lang.String,java.lang.String> |
getCompactionParameters() |
java.lang.String |
getCompactionParametersJson() |
CompactionStrategyManager |
getCompactionStrategyManager() |
ClusteringComparator |
getComparator() |
java.util.Map<java.lang.String,java.lang.String> |
getCompressionParameters()
Get the compression parameters
|
java.lang.Double |
getCrcCheckChance() |
Directories |
getDirectories() |
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.
|
static Directories.DataDirectory[] |
getInitialDirectories() |
int |
getLevelFanoutSize() |
java.util.Set<SSTableReader> |
getLiveSSTables() |
int |
getMaximumCompactionThreshold()
Gets the maximum number of sstables in queue before compaction kicks off
|
SSTableReader |
getMaxSizeFile(java.lang.Iterable<SSTableReader> sstables) |
int |
getMeanColumns() |
double |
getMeanPartitionSize() |
int |
getMinimumCompactionThreshold()
Gets the minimum number of sstables in queue before compaction kicks off
|
java.util.Collection<SSTableReader> |
getOverlappingLiveSSTables(java.lang.Iterable<SSTableReader> sstables) |
IPartitioner |
getPartitioner() |
CachedPartition |
getRawCachedPartition(DecoratedKey key) |
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.lang.String |
getSSTablePath(java.io.File directory) |
java.lang.String |
getSSTablePath(java.io.File directory,
SSTableFormat.Type format) |
java.lang.Iterable<SSTableReader> |
getSSTables(SSTableSet sstableSet) |
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.util.List<java.lang.String> |
getSSTablesForKey(java.lang.String key,
boolean hexFormat)
Returns a list of filenames that contain the given key on this node
|
java.lang.String |
getTableName() |
Tracker |
getTracker()
Package protected for access from the CompactionManager.
|
java.lang.Iterable<SSTableReader> |
getUncompactingSSTables() |
int |
getUnleveledSSTables() |
void |
invalidate()
call when dropping or renaming a CF.
|
void |
invalidate(boolean expectMBean) |
void |
invalidateCachedPartition(DecoratedKey key) |
void |
invalidateCachedPartition(RowCacheKey key) |
int |
invalidateCounterCache(java.util.Collection<Bounds<Token>> boundsToInvalidate) |
int |
invalidateRowCache(java.util.Collection<Bounds<Token>> boundsToInvalidate) |
boolean |
isAutoCompactionDisabled() |
boolean |
isCompactionDiskSpaceCheckEnabled() |
boolean |
isCounterCacheEnabled() |
boolean |
isEmpty() |
boolean |
isFilterFullyCoveredBy(ClusteringIndexFilter filter,
DataLimits limits,
CachedPartition cached,
int nowInSec) |
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 |
LifecycleTransaction |
markAllCompacting(OperationType operationType) |
void |
markObsolete(java.util.Collection<SSTableReader> sstables,
OperationType compactionType) |
void |
putCachedCounter(java.nio.ByteBuffer partitionKey,
Clustering clustering,
ColumnDefinition column,
CellPath path,
ClockAndCount clockAndCount) |
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() |
CompactionManager.AllSSTableOpStatus |
relocateSSTables(int jobs) |
<V> V |
runWithCompactionsDisabled(java.util.concurrent.Callable<V> callable,
boolean interruptValidation,
boolean interruptViews) |
CompactionManager.AllSSTableOpStatus |
scrub(boolean disableSnapshot,
boolean skipCorrupted,
boolean alwaysFail,
boolean checkData,
int jobs) |
CompactionManager.AllSSTableOpStatus |
scrub(boolean disableSnapshot,
boolean skipCorrupted,
boolean checkData,
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.
|
ColumnFamilyStore.ViewFragment |
select(com.google.common.base.Function<View,java.lang.Iterable<SSTableReader>> filter) |
ColumnFamilyStore.RefViewFragment |
selectAndReference(com.google.common.base.Function<View,java.lang.Iterable<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 |
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 |
shutdownPostFlushExecutor() |
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,
boolean skipFlush)
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 skipFlush) |
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) |
boolean |
supportsEarlyOpen() |
com.google.common.util.concurrent.ListenableFuture<CommitLogPosition> |
switchMemtable() |
com.google.common.util.concurrent.ListenableFuture<CommitLogPosition> |
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
|
CompactionManager.AllSSTableOpStatus |
verify(boolean extendedVerify) |
public static final java.lang.String SNAPSHOT_TRUNCATE_PREFIX
public static final java.lang.String SNAPSHOT_DROP_PREFIX
public final Keyspace keyspace
public final java.lang.String name
public final CFMetaData metadata
public final OpOrder readOrdering
public final SecondaryIndexManager indexManager
public final TableViews viewManager
public final TableMetrics metric
public volatile long sampleLatencyNanos
public ColumnFamilyStore(Keyspace keyspace, java.lang.String columnFamilyName, int generation, CFMetaData metadata, Directories directories, boolean loadSSTables, boolean registerBookeeping, boolean offline)
public static void addInitialDirectories(Directories.DataDirectory[] newDirectories)
public static Directories.DataDirectory[] getInitialDirectories()
public static void shutdownPostFlushExecutor() throws java.lang.InterruptedException
java.lang.InterruptedException
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 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 Directories getDirectories()
public SSTableMultiWriter createSSTableMultiWriter(Descriptor descriptor, long keyCount, long repairedAt, int sstableLevel, SerializationHeader header, LifecycleTransaction txn)
public SSTableMultiWriter createSSTableMultiWriter(Descriptor descriptor, long keyCount, long repairedAt, MetadataCollector metadataCollector, SerializationHeader header, LifecycleTransaction txn)
public boolean supportsEarlyOpen()
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, CFMetaData metadata, boolean loadSSTables)
public static ColumnFamilyStore createColumnFamilyStore(Keyspace keyspace, java.lang.String columnFamily, CFMetaData metadata, Directories directories, boolean loadSSTables, boolean registerBookkeeping, boolean offline)
public static void scrubDataDirectories(CFMetaData metadata) throws StartupException
StartupException
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)
@Deprecated public java.lang.String getColumnFamilyName()
getColumnFamilyName
in interface ColumnFamilyStoreMBean
public java.lang.String getTableName()
getTableName
in interface ColumnFamilyStoreMBean
public java.lang.String getSSTablePath(java.io.File directory)
public java.lang.String getSSTablePath(java.io.File directory, SSTableFormat.Type format)
public com.google.common.util.concurrent.ListenableFuture<CommitLogPosition> switchMemtableIfCurrent(Memtable memtable)
memtable
- public com.google.common.util.concurrent.ListenableFuture<CommitLogPosition> switchMemtable()
public com.google.common.util.concurrent.ListenableFuture<CommitLogPosition> forceFlush()
public com.google.common.util.concurrent.ListenableFuture<?> forceFlush(CommitLogPosition flushIfDirtyBefore)
public CommitLogPosition forceBlockingFlush()
public void apply(PartitionUpdate update, UpdateTransaction indexer, OpOrder.Group opGroup, CommitLogPosition commitLogPosition)
public java.util.Collection<SSTableReader> getOverlappingLiveSSTables(java.lang.Iterable<SSTableReader> sstables)
sstables
- public Refs<SSTableReader> getAndReferenceOverlappingLiveSSTables(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, 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, 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 CompactionManager.AllSSTableOpStatus relocateSSTables(int jobs) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public CompactionManager.AllSSTableOpStatus garbageCollect(CompactionParams.TombstoneOption tombstoneOption, 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.Set<SSTableReader> getLiveSSTables()
public java.lang.Iterable<SSTableReader> getSSTables(SSTableSet sstableSet)
public java.lang.Iterable<SSTableReader> getUncompactingSSTables()
public boolean isFilterFullyCoveredBy(ClusteringIndexFilter filter, DataLimits limits, CachedPartition cached, int nowInSec)
public int gcBefore(int nowInSec)
public ColumnFamilyStore.RefViewFragment selectAndReference(com.google.common.base.Function<View,java.lang.Iterable<SSTableReader>> filter)
public ColumnFamilyStore.ViewFragment select(com.google.common.base.Function<View,java.lang.Iterable<SSTableReader>> filter)
public java.util.List<java.lang.String> getSSTablesForKey(java.lang.String key)
ColumnFamilyStoreMBean
getSSTablesForKey
in interface ColumnFamilyStoreMBean
public java.util.List<java.lang.String> getSSTablesForKey(java.lang.String key, boolean hexFormat)
ColumnFamilyStoreMBean
getSSTablesForKey
in interface ColumnFamilyStoreMBean
hexFormat
- if key is in hex string formatpublic 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 boolean isCompactionDiskSpaceCheckEnabled()
isCompactionDiskSpaceCheckEnabled
in interface ColumnFamilyStoreMBean
public void compactionDiskSpaceCheck(boolean enable)
compactionDiskSpaceCheck
in interface ColumnFamilyStoreMBean
public void cleanupCache()
public ClusteringComparator 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, boolean skipFlush)
snapshotName
- the name of the associated with the snapshotskipFlush
- Skip blocking flush of memtablepublic java.util.Set<SSTableReader> snapshot(java.lang.String snapshotName, com.google.common.base.Predicate<SSTableReader> predicate, boolean ephemeral, boolean skipFlush)
ephemeral
- If this flag is set to true, the snapshot will be cleaned up during next startupskipFlush
- Skip blocking flush of memtablepublic 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 CachedPartition getRawCachedPartition(DecoratedKey key)
public int invalidateRowCache(java.util.Collection<Bounds<Token>> boundsToInvalidate)
public int invalidateCounterCache(java.util.Collection<Bounds<Token>> boundsToInvalidate)
public boolean containsCachedParition(DecoratedKey key)
public void invalidateCachedPartition(RowCacheKey key)
public void invalidateCachedPartition(DecoratedKey key)
public ClockAndCount getCachedCounter(java.nio.ByteBuffer partitionKey, Clustering clustering, ColumnDefinition column, CellPath path)
public void putCachedCounter(java.nio.ByteBuffer partitionKey, Clustering clustering, ColumnDefinition column, CellPath path, 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 void forceCompactionForTokenRange(java.util.Collection<Range<Token>> tokenRanges) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
ColumnFamilyStoreMBean
forceCompactionForTokenRange
in interface ColumnFamilyStoreMBean
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public static java.lang.Iterable<ColumnFamilyStore> all()
public java.lang.Iterable<DecoratedKey> keySamples(Range<Token> range)
public void clearUnsafe()
public void truncateBlocking()
public java.util.concurrent.Future<CommitLogPosition> dumpMemtable()
public <V> V runWithCompactionsDisabled(java.util.concurrent.Callable<V> callable, boolean interruptValidation, boolean interruptViews)
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 CompactionStrategyManager getCompactionStrategyManager()
public void setCrcCheckChance(double crcCheckChance)
ColumnFamilyStoreMBean
setCrcCheckChance
in interface ColumnFamilyStoreMBean
public java.lang.Double getCrcCheckChance()
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 double getMeanPartitionSize()
public long estimateKeys()
estimateKeys
in interface ColumnFamilyStoreMBean
public IPartitioner getPartitioner()
public DecoratedKey decorateKey(java.nio.ByteBuffer key)
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 int getLevelFanoutSize()
getLevelFanoutSize
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 © 2017 The Apache Software Foundation