Package org.apache.cassandra.db
Interface ColumnFamilyStoreMBean
- All Known Implementing Classes:
ColumnFamilyStore
public interface ColumnFamilyStoreMBean
The MBean interface for ColumnFamilyStore
-
Method Summary
Modifier and TypeMethodDescriptionvoidbeginLocalSampling(String sampler, int capacity, int durationMillis) begin sampling for a specific sampler with a given capacity.voidcompactionDiskSpaceCheck(boolean enable) longfinishLocalSampling(String sampler, int count) voidforceCompactionForTokenRange(Collection<Range<Token>> tokenRanges) Deprecated.See CASSANDRA-17527voidforceCompactionForTokenRanges(String... tokenRanges) Forces a major compaction of specified token ranges in this column family.voidforceMajorCompaction(boolean splitOutput) force a major compaction of this column familyReturns a list of the names of the built column indexes for current storeDeprecated.See CASSANDRA-9448Get the compression parametersdoubleGet the ratio of droppable tombstones to real columns (and non-droppable tombstones)intintGets the maximum number of sstables in queue before compaction kicks offlongReturns the longest duration of an SSTable, in milliseconds, of this table, computed asmaxTimestamp - minTimestamp.longReturns the size of the biggest SSTable of this table.intGets the minimum number of sstables in queue before compaction kicks offbooleanlong[]int[]int[]getSSTablesForKey(String key) Returns a list of filenames that contain the given key on this nodegetSSTablesForKey(String key, boolean hexFormat) Returns a list of filenames that contain the given key on this nodegetSSTablesForKeyWithLevel(String key, boolean hexFormat) Returns a list of filenames that contain the given key and which level they belong to.intbooleanCheck SSTables whether or not they are misplaced.importNewSSTables(Set<String> srcPaths, boolean resetLevel, boolean clearRepaired, boolean verifySSTables, boolean verifyTokens, boolean invalidateCaches, boolean extendedVerify) Deprecated.See CASSANDRA-16407importNewSSTables(Set<String> srcPaths, boolean resetLevel, boolean clearRepaired, boolean verifySSTables, boolean verifyTokens, boolean invalidateCaches, boolean extendedVerify, boolean copyData) Deprecated.See CASSANDRA-18714importNewSSTables(Set<String> srcPaths, boolean resetLevel, boolean clearRepaired, boolean verifySSTables, boolean verifyTokens, boolean invalidateCaches, boolean extendedVerify, boolean copyData, boolean failOnMissingIndex, boolean validateIndexChecksum) Load new sstables from the given directorybooleanbooleanbooleanvoidDeprecated.See CASSANDRA-6719voidsetCompactionParameters(Map<String, 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 restartedvoidsetCompactionParametersJson(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 restartedvoidsetCompactionThresholds(int minThreshold, int maxThreshold) Sets the maximum and maximum number of SSTables in queue before compaction kicks offvoidsetCompressionParameters(Map<String, String> opts) Set the compression parameters locally for this nodevoidsetCompressionParametersJson(String options) voidsetCrcCheckChance(double crcCheckChance) Set new crc check chancevoidsetMaximumCompactionThreshold(int threshold) Sets the maximum number of sstables in queue before compaction kicks offvoidsetMinimumCompactionThreshold(int threshold) Sets the minimum number of sstables in queue before compaction kicks offvoidsetNeverPurgeTombstones(boolean value) long
-
Method Details
-
getColumnFamilyName
Deprecated.See CASSANDRA-9448 -
getTableName
String getTableName() -
forceMajorCompaction
force a major compaction of this column family- Parameters:
splitOutput- true if the output of the major compaction should be split in several sstables- Throws:
ExecutionExceptionInterruptedException
-
forceCompactionForTokenRange
@Deprecated(since="4.1") void forceCompactionForTokenRange(Collection<Range<Token>> tokenRanges) throws ExecutionException, InterruptedException Deprecated.See CASSANDRA-17527Forces a major compaction of specified token ranges in this column family.The token ranges will be interpreted as closed intervals to match the closed interval defined by the first and last keys of a sstable, even though the
Rangeclass is suppossed to be half-open by definition.- Parameters:
tokenRanges- The token ranges to be compacted, interpreted as closed intervals.- Throws:
ExecutionExceptionInterruptedException
-
forceCompactionForTokenRanges
Forces a major compaction of specified token ranges in this column family.The token ranges will be interpreted as closed intervals to match the closed interval defined by the first and last keys of a sstable, even though the
Rangeclass is suppossed to be half-open by definition. -
getMinimumCompactionThreshold
int getMinimumCompactionThreshold()Gets the minimum number of sstables in queue before compaction kicks off -
setMinimumCompactionThreshold
void setMinimumCompactionThreshold(int threshold) Sets the minimum number of sstables in queue before compaction kicks off -
getMaximumCompactionThreshold
int getMaximumCompactionThreshold()Gets the maximum number of sstables in queue before compaction kicks off -
setCompactionThresholds
void setCompactionThresholds(int minThreshold, int maxThreshold) Sets the maximum and maximum number of SSTables in queue before compaction kicks off -
setMaximumCompactionThreshold
void setMaximumCompactionThreshold(int threshold) Sets the maximum number of sstables in queue before compaction kicks off -
setCompactionParametersJson
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- Parameters:
options- compaction options with the same syntax as when doing ALTER ... WITH compaction = {..}
-
getCompactionParametersJson
String getCompactionParametersJson() -
setCompactionParameters
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- Parameters:
options- compaction options map
-
getCompactionParameters
-
getCompressionParameters
Get the compression parameters -
getCompressionParametersJson
String getCompressionParametersJson() -
setCompressionParameters
Set the compression parameters locally for this node- Parameters:
opts- map of string names to values
-
setCompressionParametersJson
-
setCrcCheckChance
void setCrcCheckChance(double crcCheckChance) Set new crc check chance -
isAutoCompactionDisabled
boolean isAutoCompactionDisabled() -
estimateKeys
long estimateKeys() -
getBuiltIndexes
Returns a list of the names of the built column indexes for current store- Returns:
- list of the index names
-
getSSTablesForKey
Returns a list of filenames that contain the given key on this node- Parameters:
key-- Returns:
- list of filenames containing the key
-
getSSTablesForKey
Returns a list of filenames that contain the given key on this node- Parameters:
key-hexFormat- if key is in hex string format- Returns:
- list of filenames containing the key
-
getSSTablesForKeyWithLevel
Returns a list of filenames that contain the given key and which level they belong to. Requires table to be compacted withLeveledCompactionStrategy- Parameters:
key-hexFormat-- Returns:
- list of filenames and levels containing the key
-
importNewSSTables
@Deprecated(since="4.0") List<String> importNewSSTables(Set<String> srcPaths, boolean resetLevel, boolean clearRepaired, boolean verifySSTables, boolean verifyTokens, boolean invalidateCaches, boolean extendedVerify) Deprecated.See CASSANDRA-16407 -
importNewSSTables
@Deprecated(since="5.0") List<String> importNewSSTables(Set<String> srcPaths, boolean resetLevel, boolean clearRepaired, boolean verifySSTables, boolean verifyTokens, boolean invalidateCaches, boolean extendedVerify, boolean copyData) Deprecated.See CASSANDRA-18714 -
importNewSSTables
List<String> importNewSSTables(Set<String> srcPaths, boolean resetLevel, boolean clearRepaired, boolean verifySSTables, boolean verifyTokens, boolean invalidateCaches, boolean extendedVerify, boolean copyData, boolean failOnMissingIndex, boolean validateIndexChecksum) Load new sstables from the given directory- Parameters:
srcPaths- the path to the new sstables - if it is an empty set, the data directories will be scannedresetLevel- if the level should be reset to 0 on the new sstablesclearRepaired- if repaired info should be wiped from the new sstablesverifySSTables- if the new sstables should be verified that they are not corruptverifyTokens- if the tokens in the new sstables should be verified that they are owned by the current nodeinvalidateCaches- if row cache should be invalidated for the keys in the new sstablesextendedVerify- if we should run an extended verify checking all values in the new sstablescopyData- if we should copy data from source paths instead of moving themvalidateIndexChecksum- if we should also validate checksum for SAI indexesfailOnMissingIndex- if loading should fail when SSTables do not contain built SAI indexes too- Returns:
- list of failed import directories
-
loadNewSSTables
Deprecated.See CASSANDRA-6719 -
getUnleveledSSTables
int getUnleveledSSTables()- Returns:
- the number of SSTables in L0. Always return 0 if Leveled compaction is not enabled.
-
getSSTableCountPerLevel
int[] getSSTableCountPerLevel()- Returns:
- sstable count for each level. null unless leveled compaction is used. array index corresponds to level(int[0] is for level 0, ...).
-
getPerLevelSizeBytes
long[] getPerLevelSizeBytes()- Returns:
- total size on disk for each level. null unless leveled compaction is used. array index corresponds to level(int[0] is for level 0, ...).
-
isLeveledCompaction
boolean isLeveledCompaction()- Returns:
- true if the table is using LeveledCompactionStrategy. false otherwise.
-
getSSTableCountPerTWCSBucket
int[] getSSTableCountPerTWCSBucket()- Returns:
- sstable count for each bucket in TWCS. null unless time window compaction is used. array index corresponds to bucket(int[0] is for most recent, ...).
-
getLevelFanoutSize
int getLevelFanoutSize()- Returns:
- sstable fanout size for level compaction strategy.
-
getDroppableTombstoneRatio
double getDroppableTombstoneRatio()Get the ratio of droppable tombstones to real columns (and non-droppable tombstones)- Returns:
- ratio
-
trueSnapshotsSize
long trueSnapshotsSize()- Returns:
- the size of SSTables in "snapshots" subdirectory which aren't live anymore
-
beginLocalSampling
begin sampling for a specific sampler with a given capacity. The cardinality may be larger than the capacity, but depending on the use case it may affect its accuracy -
finishLocalSampling
- Returns:
- top count items for the sampler since beginLocalSampling was called
- Throws:
OpenDataException
-
isCompactionDiskSpaceCheckEnabled
boolean isCompactionDiskSpaceCheckEnabled() -
compactionDiskSpaceCheck
void compactionDiskSpaceCheck(boolean enable) -
setNeverPurgeTombstones
void setNeverPurgeTombstones(boolean value) -
getNeverPurgeTombstones
boolean getNeverPurgeTombstones() -
hasMisplacedSSTables
boolean hasMisplacedSSTables()Check SSTables whether or not they are misplaced.- Returns:
- true if any of the SSTables is misplaced. If all SSTables are correctly placed or the partitioner does not support splitting, it returns false.
-
getDataPaths
- Throws:
IOException
-
getTopSizePartitions
-
getTopSizePartitionsLastUpdate
Long getTopSizePartitionsLastUpdate() -
getTopTombstonePartitions
-
getTopTombstonePartitionsLastUpdate
Long getTopTombstonePartitionsLastUpdate() -
getMaxSSTableSize
long getMaxSSTableSize()Returns the size of the biggest SSTable of this table.- Returns:
- (physical) size of the biggest SSTable of this table on disk or 0 if no SSTable is present
-
getMaxSSTableDuration
long getMaxSSTableDuration()Returns the longest duration of an SSTable, in milliseconds, of this table, computed asmaxTimestamp - minTimestamp. It returns 0 if there are no SSTables or ifmaxTimestamporminTimestampis equal toLong.MAX_VALUE. Effectively non-zero for tables onTimeWindowCompactionStrategy.- Returns:
- the biggest
maxTimestamp - minTimestampamong all SSTables of this table or 0 if no SSTable is present
-