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 |
|---|---|
long |
additionalWriteLatencyNanos |
SecondaryIndexManager |
indexManager |
Keyspace |
keyspace |
TableMetadataRef |
metadata |
TableMetrics |
metric |
java.lang.String |
name |
OpOrder |
readOrdering |
long |
sampleReadLatencyNanos |
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,
TableMetadataRef metadata,
Directories directories,
boolean loadSSTables,
boolean registerBookeeping,
boolean offline) |
| 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(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,
int durationMillis)
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,
java.lang.String columnFamily,
TableMetadataRef metadata,
boolean loadSSTables) |
static ColumnFamilyStore |
createColumnFamilyStore(Keyspace keyspace,
java.lang.String columnFamily,
TableMetadataRef metadata,
Directories directories,
boolean loadSSTables,
boolean registerBookkeeping,
boolean offline)
This is only directly used by offline tools
|
static ColumnFamilyStore |
createColumnFamilyStore(Keyspace keyspace,
TableMetadataRef metadata,
boolean loadSSTables) |
AbstractCompactionStrategy |
createCompactionStrategyInstance(CompactionParams compactionParams) |
SSTableMultiWriter |
createSSTableMultiWriter(Descriptor descriptor,
long keyCount,
long repairedAt,
java.util.UUID pendingRepair,
boolean isTransient,
int sstableLevel,
SerializationHeader header,
LifecycleNewTracker lifecycleNewTracker) |
SSTableMultiWriter |
createSSTableMultiWriter(Descriptor descriptor,
long keyCount,
long repairedAt,
java.util.UUID pendingRepair,
boolean isTransient,
MetadataCollector metadataCollector,
SerializationHeader header,
LifecycleNewTracker lifecycleNewTracker) |
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() |
java.util.List<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,
ColumnMetadata column,
CellPath path) |
static java.lang.String |
getColumnFamilieMBeanName(java.lang.String ks,
java.lang.String name,
boolean isIndex) |
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.String |
getCompressionParametersJson() |
java.lang.Double |
getCrcCheckChance() |
Directories |
getDirectories() |
DiskBoundaries |
getDiskBoundaries() |
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(TableId id)
Returns a ColumnFamilyStore by id if it exists, null otherwise
Differently from others, this method does not throw exception if the table does not exist.
|
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 |
getMeanEstimatedCellPerPartitionCount() |
double |
getMeanPartitionSize() |
int |
getMeanRowCount() |
int |
getMinimumCompactionThreshold()
Gets the minimum number of sstables in queue before compaction kicks off
|
boolean |
getNeverPurgeTombstones() |
java.util.Collection<SSTableReader> |
getOverlappingLiveSSTables(java.lang.Iterable<SSTableReader> sstables) |
IPartitioner |
getPartitioner() |
java.util.Map<java.util.UUID,PendingStat> |
getPendingRepairStats() |
CachedPartition |
getRawCachedPartition(DecoratedKey key) |
TableRepairManager |
getRepairManager() |
long |
getSnapshotCreationTime(java.lang.String snapshotName) |
java.util.Map<java.lang.String,Directories.SnapshotSizeDetails> |
getSnapshotDetails() |
Refs<SSTableReader> |
getSnapshotSSTableReaders(java.lang.String tag) |
int[] |
getSSTableCountPerLevel() |
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
|
TableStreamManager |
getStreamManager() |
static java.lang.String |
getTableMBeanName(java.lang.String ks,
java.lang.String name,
boolean isIndex) |
java.lang.String |
getTableName() |
Tracker |
getTracker()
Package protected for access from the CompactionManager.
|
java.lang.Iterable<SSTableReader> |
getUncompactingSSTables() |
int |
getUnleveledSSTables() |
TableWriteHandler |
getWriteHandler() |
java.util.List<java.lang.String> |
importNewSSTables(java.util.Set<java.lang.String> srcPaths,
boolean resetLevel,
boolean clearRepaired,
boolean verifySSTables,
boolean verifyTokens,
boolean invalidateCaches,
boolean extendedVerify)
#Load new sstables from the given directory
|
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) |
void |
invalidateDiskBoundaries() |
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 enforceStrictLiveness) |
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()
Deprecated.
|
static void |
loadNewSSTables(java.lang.String ksName,
java.lang.String cfName)
See #
StorageService.importNewSSTables for more info |
LifecycleTransaction |
markAllCompacting(OperationType operationType) |
void |
markObsolete(java.util.Collection<SSTableReader> sstables,
OperationType compactionType) |
TableMetadata |
metadata() |
static TableMetrics |
metricsFor(TableId tableId) |
Descriptor |
newSSTableDescriptor(java.io.File directory) |
Descriptor |
newSSTableDescriptor(java.io.File directory,
SSTableFormat.Type format) |
Descriptor |
newSSTableDescriptor(java.io.File directory,
Version version,
SSTableFormat.Type format) |
void |
putCachedCounter(java.nio.ByteBuffer partitionKey,
Clustering<?> clustering,
ColumnMetadata 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) |
CleanupSummary |
releaseRepairData(java.util.Collection<java.util.UUID> sessions,
boolean force)
promotes (or demotes) data attached to an incremental repair session that has either completed successfully,
or failed
|
void |
reload() |
CompactionManager.AllSSTableOpStatus |
relocateSSTables(int jobs) |
<V> V |
runWithCompactionsDisabled(java.util.concurrent.Callable<V> callable,
boolean interruptValidation,
boolean interruptViews) |
<V> V |
runWithCompactionsDisabled(java.util.concurrent.Callable<V> callable,
com.google.common.base.Predicate<SSTableReader> sstablesPredicate,
boolean interruptValidation,
boolean interruptViews,
boolean interruptIndexes)
Runs callable with compactions paused and compactions including sstables matching sstablePredicate stopped
|
CompactionManager.AllSSTableOpStatus |
scrub(boolean disableSnapshot,
boolean skipCorrupted,
boolean reinsertOverflowedTTL,
boolean alwaysFail,
boolean checkData,
int jobs) |
CompactionManager.AllSSTableOpStatus |
scrub(boolean disableSnapshot,
boolean skipCorrupted,
boolean checkData,
boolean reinsertOverflowedTTL,
int jobs) |
static void |
scrubDataDirectories(TableMetadata 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 locally for this node
|
void |
setCompressionParametersJson(java.lang.String options) |
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 |
setNeverPurgeTombstones(boolean value) |
static void |
shutdownExecutorsAndWait(long timeout,
java.util.concurrent.TimeUnit unit) |
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,
com.google.common.util.concurrent.RateLimiter rateLimiter)
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) |
java.util.Set<SSTableReader> |
snapshot(java.lang.String snapshotName,
com.google.common.base.Predicate<SSTableReader> predicate,
boolean ephemeral,
boolean skipFlush,
com.google.common.util.concurrent.RateLimiter rateLimiter) |
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,
com.google.common.util.concurrent.RateLimiter rateLimiter) |
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
|
void |
updateSpeculationThreshold() |
CompactionManager.AllSSTableOpStatus |
verify(Verifier.Options options) |
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 TableMetadataRef metadata
public final OpOrder readOrdering
public final SecondaryIndexManager indexManager
public final TableViews viewManager
public final TableMetrics metric
public volatile long sampleReadLatencyNanos
public volatile long additionalWriteLatencyNanos
public ColumnFamilyStore(Keyspace keyspace, java.lang.String columnFamilyName, int generation, TableMetadataRef metadata, Directories directories, boolean loadSSTables, boolean registerBookeeping, boolean offline)
public static void shutdownPostFlushExecutor()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic static void shutdownExecutorsAndWait(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException,
java.util.concurrent.TimeoutException
java.lang.InterruptedExceptionjava.util.concurrent.TimeoutExceptionpublic void reload()
public static java.lang.Runnable getBackgroundCompactionTaskSubmitter()
public java.util.Map<java.lang.String,java.lang.String> getCompactionParameters()
getCompactionParameters in interface ColumnFamilyStoreMBeanpublic java.lang.String getCompactionParametersJson()
getCompactionParametersJson in interface ColumnFamilyStoreMBeanpublic void setCompactionParameters(java.util.Map<java.lang.String,java.lang.String> options)
ColumnFamilyStoreMBeansetCompactionParameters in interface ColumnFamilyStoreMBeanoptions - compaction options mappublic void setCompactionParametersJson(java.lang.String options)
ColumnFamilyStoreMBeansetCompactionParametersJson in interface ColumnFamilyStoreMBeanoptions - compaction options with the same syntax as when doing ALTER ... WITH compaction = {..}public java.util.Map<java.lang.String,java.lang.String> getCompressionParameters()
ColumnFamilyStoreMBeangetCompressionParameters in interface ColumnFamilyStoreMBeanpublic java.lang.String getCompressionParametersJson()
getCompressionParametersJson in interface ColumnFamilyStoreMBeanpublic void setCompressionParameters(java.util.Map<java.lang.String,java.lang.String> opts)
ColumnFamilyStoreMBeansetCompressionParameters in interface ColumnFamilyStoreMBeanopts - map of string names to valuespublic void setCompressionParametersJson(java.lang.String options)
setCompressionParametersJson in interface ColumnFamilyStoreMBeanpublic static java.lang.String getTableMBeanName(java.lang.String ks,
java.lang.String name,
boolean isIndex)
public static java.lang.String getColumnFamilieMBeanName(java.lang.String ks,
java.lang.String name,
boolean isIndex)
public void updateSpeculationThreshold()
public TableWriteHandler getWriteHandler()
public TableStreamManager getStreamManager()
public TableRepairManager getRepairManager()
public TableMetadata metadata()
public Directories getDirectories()
public SSTableMultiWriter createSSTableMultiWriter(Descriptor descriptor, long keyCount, long repairedAt, java.util.UUID pendingRepair, boolean isTransient, int sstableLevel, SerializationHeader header, LifecycleNewTracker lifecycleNewTracker)
public SSTableMultiWriter createSSTableMultiWriter(Descriptor descriptor, long keyCount, long repairedAt, java.util.UUID pendingRepair, boolean isTransient, MetadataCollector metadataCollector, SerializationHeader header, LifecycleNewTracker lifecycleNewTracker)
public boolean supportsEarlyOpen()
public void invalidate()
public void invalidate(boolean expectMBean)
public static ColumnFamilyStore createColumnFamilyStore(Keyspace keyspace, TableMetadataRef metadata, boolean loadSSTables)
public static ColumnFamilyStore createColumnFamilyStore(Keyspace keyspace, java.lang.String columnFamily, TableMetadataRef metadata, boolean loadSSTables)
public static ColumnFamilyStore createColumnFamilyStore(Keyspace keyspace, java.lang.String columnFamily, TableMetadataRef metadata, Directories directories, boolean loadSSTables, boolean registerBookkeeping, boolean offline)
public static void scrubDataDirectories(TableMetadata metadata) throws StartupException
StartupExceptionpublic static void loadNewSSTables(java.lang.String ksName,
java.lang.String cfName)
StorageService.importNewSSTables for more infoksName - The keyspace namecfName - The columnFamily name@Deprecated public void loadNewSSTables()
loadNewSSTables in interface ColumnFamilyStoreMBeanpublic java.util.List<java.lang.String> importNewSSTables(java.util.Set<java.lang.String> srcPaths,
boolean resetLevel,
boolean clearRepaired,
boolean verifySSTables,
boolean verifyTokens,
boolean invalidateCaches,
boolean extendedVerify)
importNewSSTables in interface ColumnFamilyStoreMBeansrcPaths - 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 sstablespublic void rebuildSecondaryIndex(java.lang.String idxName)
public static void rebuildSecondaryIndex(java.lang.String ksName,
java.lang.String cfName,
java.lang.String... idxNames)
public AbstractCompactionStrategy createCompactionStrategyInstance(CompactionParams compactionParams)
@Deprecated public java.lang.String getColumnFamilyName()
getColumnFamilyName in interface ColumnFamilyStoreMBeanpublic java.lang.String getTableName()
getTableName in interface ColumnFamilyStoreMBeanpublic Descriptor newSSTableDescriptor(java.io.File directory)
public Descriptor newSSTableDescriptor(java.io.File directory, SSTableFormat.Type format)
public Descriptor newSSTableDescriptor(java.io.File directory, Version version, 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.ExecutionExceptionjava.lang.InterruptedExceptionpublic CompactionManager.AllSSTableOpStatus scrub(boolean disableSnapshot, boolean skipCorrupted, boolean checkData, boolean reinsertOverflowedTTL, int jobs) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic CompactionManager.AllSSTableOpStatus scrub(boolean disableSnapshot, boolean skipCorrupted, boolean reinsertOverflowedTTL, boolean alwaysFail, boolean checkData, int jobs) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic boolean rebuildOnFailedScrub(java.lang.Throwable failure)
public CompactionManager.AllSSTableOpStatus verify(Verifier.Options options) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic CompactionManager.AllSSTableOpStatus sstablesRewrite(boolean excludeCurrentVersion, int jobs) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic CompactionManager.AllSSTableOpStatus relocateSSTables(int jobs) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic CompactionManager.AllSSTableOpStatus garbageCollect(CompactionParams.TombstoneOption tombstoneOption, int jobs) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic 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 java.util.Map<java.util.UUID,PendingStat> getPendingRepairStats()
public CleanupSummary releaseRepairData(java.util.Collection<java.util.UUID> sessions, boolean force)
public boolean isFilterFullyCoveredBy(ClusteringIndexFilter filter, DataLimits limits, CachedPartition cached, int nowInSec, boolean enforceStrictLiveness)
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)
ColumnFamilyStoreMBeangetSSTablesForKey in interface ColumnFamilyStoreMBeanpublic java.util.List<java.lang.String> getSSTablesForKey(java.lang.String key,
boolean hexFormat)
ColumnFamilyStoreMBeangetSSTablesForKey in interface ColumnFamilyStoreMBeanhexFormat - if key is in hex string formatpublic void beginLocalSampling(java.lang.String sampler,
int capacity,
int durationMillis)
ColumnFamilyStoreMBeanbeginLocalSampling in interface ColumnFamilyStoreMBeanpublic java.util.List<javax.management.openmbean.CompositeData> finishLocalSampling(java.lang.String sampler,
int count)
throws javax.management.openmbean.OpenDataException
finishLocalSampling in interface ColumnFamilyStoreMBeanjavax.management.openmbean.OpenDataExceptionpublic boolean isCompactionDiskSpaceCheckEnabled()
isCompactionDiskSpaceCheckEnabled in interface ColumnFamilyStoreMBeanpublic void compactionDiskSpaceCheck(boolean enable)
compactionDiskSpaceCheck in interface ColumnFamilyStoreMBeanpublic 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, com.google.common.util.concurrent.RateLimiter rateLimiter)
ephemeral - If this flag is set to true, the snapshot will be cleaned during next startupprotected static void clearEphemeralSnapshots(Directories directories)
public Refs<SSTableReader> getSnapshotSSTableReaders(java.lang.String tag) throws java.io.IOException
java.io.IOExceptionpublic 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, com.google.common.util.concurrent.RateLimiter rateLimiter)
snapshotName - the name of the associated with the snapshotskipFlush - Skip blocking flush of memtablerateLimiter - Rate limiter for hardlinks-per-secondpublic 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 java.util.Set<SSTableReader> snapshot(java.lang.String snapshotName, com.google.common.base.Predicate<SSTableReader> predicate, boolean ephemeral, boolean skipFlush, com.google.common.util.concurrent.RateLimiter rateLimiter)
ephemeral - If this flag is set to true, the snapshot will be cleaned up during next startupskipFlush - Skip blocking flush of memtablerateLimiter - Rate limiter for hardlinks-per-secondpublic 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,Directories.SnapshotSizeDetails> 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, ColumnMetadata column, CellPath path)
public void putCachedCounter(java.nio.ByteBuffer partitionKey,
Clustering<?> clustering,
ColumnMetadata column,
CellPath path,
ClockAndCount clockAndCount)
public void forceMajorCompaction()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionpublic void forceMajorCompaction(boolean splitOutput)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
ColumnFamilyStoreMBeanforceMajorCompaction in interface ColumnFamilyStoreMBeansplitOutput - true if the output of the major compaction should be split in several sstablesjava.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionpublic void forceCompactionForTokenRange(java.util.Collection<Range<Token>> tokenRanges) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
ColumnFamilyStoreMBeanforceCompactionForTokenRange in interface ColumnFamilyStoreMBeanjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic 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 <V> V runWithCompactionsDisabled(java.util.concurrent.Callable<V> callable,
com.google.common.base.Predicate<SSTableReader> sstablesPredicate,
boolean interruptValidation,
boolean interruptViews,
boolean interruptIndexes)
callable - what to do when compactions are pausedsstablesPredicate - which sstables should we cancel compactions forinterruptValidation - if we should interrupt validation compactionsinterruptViews - if we should interrupt view compactionsinterruptIndexes - if we should interrupt compactions on indexes. NOTE: if you set this to true your sstablePredicate
must be able to handle LocalPartitioner sstables!public LifecycleTransaction markAllCompacting(OperationType operationType)
public java.lang.String toString()
toString in class java.lang.Objectpublic void disableAutoCompaction()
public void enableAutoCompaction()
public void enableAutoCompaction(boolean waitForFutures)
waitForFutures - if we should block until autocompaction is donepublic boolean isAutoCompactionDisabled()
isAutoCompactionDisabled in interface ColumnFamilyStoreMBeanpublic CompactionStrategyManager getCompactionStrategyManager()
public void setCrcCheckChance(double crcCheckChance)
ColumnFamilyStoreMBeansetCrcCheckChance in interface ColumnFamilyStoreMBeanpublic java.lang.Double getCrcCheckChance()
public void setCompactionThresholds(int minThreshold,
int maxThreshold)
ColumnFamilyStoreMBeansetCompactionThresholds in interface ColumnFamilyStoreMBeanpublic int getMinimumCompactionThreshold()
ColumnFamilyStoreMBeangetMinimumCompactionThreshold in interface ColumnFamilyStoreMBeanpublic void setMinimumCompactionThreshold(int minCompactionThreshold)
ColumnFamilyStoreMBeansetMinimumCompactionThreshold in interface ColumnFamilyStoreMBeanpublic int getMaximumCompactionThreshold()
ColumnFamilyStoreMBeangetMaximumCompactionThreshold in interface ColumnFamilyStoreMBeanpublic void setMaximumCompactionThreshold(int maxCompactionThreshold)
ColumnFamilyStoreMBeansetMaximumCompactionThreshold in interface ColumnFamilyStoreMBeanpublic int getMeanEstimatedCellPerPartitionCount()
public double getMeanPartitionSize()
public int getMeanRowCount()
public long estimateKeys()
estimateKeys in interface ColumnFamilyStoreMBeanpublic 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()
ColumnFamilyStoreMBeangetBuiltIndexes in interface ColumnFamilyStoreMBeanpublic int getUnleveledSSTables()
getUnleveledSSTables in interface ColumnFamilyStoreMBeanpublic int[] getSSTableCountPerLevel()
getSSTableCountPerLevel in interface ColumnFamilyStoreMBeanpublic int getLevelFanoutSize()
getLevelFanoutSize in interface ColumnFamilyStoreMBeanpublic 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()
ColumnFamilyStoreMBeangetDroppableTombstoneRatio in interface ColumnFamilyStoreMBeanpublic long trueSnapshotsSize()
trueSnapshotsSize in interface ColumnFamilyStoreMBeanpublic static ColumnFamilyStore getIfExists(TableId id)
public static ColumnFamilyStore getIfExists(java.lang.String ksName, java.lang.String cfName)
public static TableMetrics metricsFor(TableId tableId)
public DiskBoundaries getDiskBoundaries()
public void invalidateDiskBoundaries()
public void setNeverPurgeTombstones(boolean value)
setNeverPurgeTombstones in interface ColumnFamilyStoreMBeanpublic boolean getNeverPurgeTombstones()
getNeverPurgeTombstones in interface ColumnFamilyStoreMBeanCopyright © 2009-2020 The Apache Software Foundation