Class CompactionManager
- java.lang.Object
-
- org.apache.cassandra.db.compaction.CompactionManager
-
- All Implemented Interfaces:
CompactionManagerMBean
public class CompactionManager extends java.lang.Object implements CompactionManagerMBean
A singleton which manages a private executor of ongoing compactions.
Scheduling for compaction is accomplished by swapping sstables to be compacted into a set via Tracker. New scheduling attempts will ignore currently compacting sstables.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCompactionManager.AllSSTableOpStatusstatic interfaceCompactionManager.CompactionPauserstatic classCompactionManager.ValidationExecutor
-
Field Summary
Fields Modifier and Type Field Description ActiveCompactionsactivejava.util.concurrent.atomic.AtomicIntegercurrentlyBackgroundUpgradingstatic intGC_ALLstatic CompactionManagerinstancestatic java.lang.StringMBEAN_OBJECT_NAMEstatic intNO_GC
-
Constructor Summary
Constructors Constructor Description CompactionManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static SSTableWritercreateWriter(ColumnFamilyStore cfs, File compactionFileLocation, long expectedBloomFilterSize, long repairedAt, TimeUUID pendingRepair, boolean isTransient, SSTableReader sstable, LifecycleTransaction txn)static SSTableWritercreateWriterForAntiCompaction(ColumnFamilyStore cfs, File compactionFileLocation, int expectedBloomFilterSize, long repairedAt, TimeUUID pendingRepair, boolean isTransient, java.util.Collection<SSTableReader> sstables, ILifecycleTransaction txn)voiddisableAutoCompaction()voidfinishCompactionsAndShutdown(long timeout, java.util.concurrent.TimeUnit unit)voidforceCompaction(ColumnFamilyStore cfStore, java.util.function.Supplier<java.util.Collection<SSTableReader>> sstablesFn, com.google.common.base.Predicate<SSTableReader> sstablesPredicate)voidforceCompactionForKey(ColumnFamilyStore cfStore, DecoratedKey key)voidforceCompactionForTokenRange(ColumnFamilyStore cfStore, java.util.Collection<Range<Token>> ranges)Forces a major compaction of specified token ranges of the specified column family.voidforceShutdown()Shutdowns both compaction and validation executors, cancels running compaction / validation, and waits for tasks to complete if tasks were not cancelable.voidforceUserDefinedCleanup(java.lang.String dataFiles)Triggers the cleanup of user specified sstables.voidforceUserDefinedCompaction(java.lang.String dataFiles)Triggers the compaction of user specified sstables.intgetActiveCompactions()static CompactionIteratorgetAntiCompactionIterator(java.util.List<ISSTableScanner> scanners, CompactionController controller, int nowInSec, TimeUUID timeUUID, ActiveCompactionsTracker activeCompactions, java.util.function.BooleanSupplier isCancelled)booleangetAutomaticSSTableUpgradeEnabled()Get automatic sstable upgrade enabledorg.apache.cassandra.db.compaction.CompactionManager.BackgroundCompactionCandidategetBackgroundCompactionCandidate(ColumnFamilyStore cfs)javax.management.openmbean.TabularDatagetCompactionHistory()compaction historyjava.util.List<java.util.Map<java.lang.String,java.lang.String>>getCompactions()List of running compaction objects.java.util.List<java.lang.String>getCompactionSummary()List of running compaction summary strings.longgetCompletedTasks()intgetCoreCompactorThreads()Returns core size of compaction thread poolintgetCoreValidationThreads()Returns core size of validation thread poolintgetCoreViewBuildThreads()Returns core size of view build thread poolstatic intgetDefaultGcBefore(ColumnFamilyStore cfs, int nowInSec)booleangetDisableSTCSInL0()Enable / disable STCS in L0intgetMaxConcurrentAutoUpgradeTasks()Get the number of concurrent sstable upgrade tasks we should run when automatic sstable upgrades are enabledintgetMaximumCompactorThreads()Returns maximum size of compaction thread poolintgetMaximumValidatorThreads()Returns size of validator thread poolintgetMaximumViewBuildThreads()Returns size of view build thread poolCompactionMetricsgetMetrics()intgetPendingTasks()com.google.common.util.concurrent.RateLimitergetRateLimiter()Gets compaction rate limiter.java.util.List<CompactionInfo>getSSTableTasks()longgetTotalBytesCompacted()longgetTotalCompactionsCompleted()booleanhasOngoingOrPendingTasks()voidincrementAborted()voidincrementCompactionsReduced()voidincrementSstablesDropppedFromCompactions(long num)voidinterruptCompactionFor(java.lang.Iterable<TableMetadata> columnFamilies, java.util.function.Predicate<SSTableReader> sstablePredicate, boolean interruptValidation)Try to stop all of the compactions for given ColumnFamilies.voidinterruptCompactionForCFs(java.lang.Iterable<ColumnFamilyStore> cfss, java.util.function.Predicate<SSTableReader> sstablePredicate, boolean interruptValidation)booleanisCompacting(java.lang.Iterable<ColumnFamilyStore> cfses, java.util.function.Predicate<SSTableReader> sstablePredicate)static booleanisCompactor(java.lang.Thread thread)booleanisGlobalCompactionPaused()Return whether "global" compactions should be paused, used by ColumnFamilyStore#runWithCompactionsDisabled a global compaction is one that includes several/all tables, currently only IndexSummaryBuilderstatic booleanneedsCleanup(SSTableReader sstable, java.util.Collection<Range<Token>> ownedRanges)Determines if a cleanup would actually remove any data in this SSTable based on a set of owned ranges.CompactionManager.CompactionPauserpauseGlobalCompaction()voidperformAnticompaction(ColumnFamilyStore cfs, RangesAtEndpoint replicas, Refs<SSTableReader> validatedForRepair, LifecycleTransaction txn, TimeUUID sessionID, java.util.function.BooleanSupplier isCancelled)Make sure the {validatedForRepair} are marked for compaction before calling this.CompactionManager.AllSSTableOpStatusperformCleanup(ColumnFamilyStore cfStore, int jobs)CompactionManager.AllSSTableOpStatusperformGarbageCollection(ColumnFamilyStore cfStore, CompactionParams.TombstoneOption tombstoneOption, int jobs)voidperformMaximal(ColumnFamilyStore cfStore, boolean splitOutput)CompactionManager.AllSSTableOpStatusperformScrub(ColumnFamilyStore cfs, boolean skipCorrupted, boolean checkData, boolean reinsertOverflowedTTL, int jobs)CompactionManager.AllSSTableOpStatusperformScrub(ColumnFamilyStore cfs, boolean skipCorrupted, boolean checkData, int jobs)CompactionManager.AllSSTableOpStatusperformSSTableRewrite(ColumnFamilyStore cfs, boolean skipIfCurrentVersion, long skipIfOlderThanTimestamp, boolean skipIfCompressionMatches, int jobs)CompactionManager.AllSSTableOpStatusperformSSTableRewrite(ColumnFamilyStore cfs, java.util.function.Predicate<SSTableReader> sstableFilter, int jobs)Perform SSTable rewriteCompactionManager.AllSSTableOpStatusperformVerify(ColumnFamilyStore cfs, Verifier.Options options)CompactionManager.AllSSTableOpStatusrelocateSSTables(ColumnFamilyStore cfs, int jobs)java.util.List<SSTableReader>runIndexSummaryRedistribution(IndexSummaryRedistribution redistribution)voidsetAutomaticSSTableUpgradeEnabled(boolean enabled)Set if automatic sstable upgrade should be enabledvoidsetConcurrentCompactors(int value)voidsetConcurrentValidations()voidsetConcurrentViewBuilders(int value)voidsetCoreCompactorThreads(int number)Allows user to resize maximum size of the compaction thread pool.voidsetCoreValidationThreads(int number)Allows user to resize maximum size of the compaction thread pool.voidsetCoreViewBuildThreads(int number)Allows user to resize maximum size of the view build thread pool.voidsetDisableSTCSInL0(boolean disabled)voidsetMaxConcurrentAutoUpgradeTasks(int value)Set the number of concurrent sstable upgrade tasks we should run when automatic sstable upgrades are enabledvoidsetMaximumCompactorThreads(int number)Allows user to resize maximum size of the compaction thread pool.voidsetMaximumValidatorThreads(int number)Allows user to resize maximum size of the validator thread pool.voidsetMaximumViewBuildThreads(int number)Allows user to resize maximum size of the view build thread pool.voidsetRate(double throughputMbPerSec)Deprecated.Use setRateInBytes insteadvoidsetRateInBytes(double throughputBytesPerSec)Sets the rate for the rate limiter.voidstopCompaction(java.lang.String type)Stop all running compaction-like tasks having the providedtype.voidstopCompactionById(java.lang.String compactionId)Stop an individual running compaction using the compactionId.java.util.List<Future<?>>submitBackground(ColumnFamilyStore cfs)Call this whenever a compaction might be needed on the given columnfamily.Future<?>submitCacheWrite(AutoSavingCache.Writer writer)Future<?>submitIndexBuild(SecondaryIndexBuilder builder)Is not scheduled, because it is performing disjoint work from sstable compaction.java.util.List<Future<?>>submitMaximal(ColumnFamilyStore cfStore, int gcBefore, boolean splitOutput)Future<java.lang.Void>submitPendingAntiCompaction(ColumnFamilyStore cfs, RangesAtEndpoint tokenRanges, Refs<SSTableReader> sstables, LifecycleTransaction txn, TimeUUID sessionId, java.util.function.BooleanSupplier isCancelled)Splits the given token ranges of the given sstables into a pending repair siloFuture<?>submitUserDefined(ColumnFamilyStore cfs, java.util.Collection<Descriptor> dataFiles, int gcBefore)Future<?>submitValidation(java.util.concurrent.Callable<java.lang.Object> validation)Future<java.lang.Long>submitViewBuilder(ViewBuilderTask task)voidwaitForCessation(java.lang.Iterable<ColumnFamilyStore> cfss, java.util.function.Predicate<SSTableReader> sstablePredicate)
-
-
-
Field Detail
-
MBEAN_OBJECT_NAME
public static final java.lang.String MBEAN_OBJECT_NAME
- See Also:
- Constant Field Values
-
instance
public static final CompactionManager instance
-
currentlyBackgroundUpgrading
public final java.util.concurrent.atomic.AtomicInteger currentlyBackgroundUpgrading
-
NO_GC
public static final int NO_GC
- See Also:
- Constant Field Values
-
GC_ALL
public static final int GC_ALL
- See Also:
- Constant Field Values
-
active
public final ActiveCompactions active
-
-
Method Detail
-
getMetrics
public CompactionMetrics getMetrics()
-
getRateLimiter
public com.google.common.util.concurrent.RateLimiter getRateLimiter()
Gets compaction rate limiter. Rate unit is bytes per sec.- Returns:
- RateLimiter with rate limit set
-
setRate
@Deprecated public void setRate(double throughputMbPerSec)
Deprecated.Use setRateInBytes insteadSets the rate for the rate limiter. When compaction_throughput is 0 or node is bootstrapping, this sets the rate to Double.MAX_VALUE bytes per second.- Parameters:
throughputMbPerSec- throughput to set in MiB/s
-
setRateInBytes
public void setRateInBytes(double throughputBytesPerSec)
Sets the rate for the rate limiter. When compaction_throughput is 0 or node is bootstrapping, this sets the rate to Double.MAX_VALUE bytes per second.- Parameters:
throughputBytesPerSec- throughput to set in B/s
-
submitBackground
public java.util.List<Future<?>> submitBackground(ColumnFamilyStore cfs)
Call this whenever a compaction might be needed on the given columnfamily. It's okay to over-call (within reason) if a call is unnecessary, it will turn into a no-op in the bucketing/candidate-scan phase.
-
isCompacting
public boolean isCompacting(java.lang.Iterable<ColumnFamilyStore> cfses, java.util.function.Predicate<SSTableReader> sstablePredicate)
-
hasOngoingOrPendingTasks
public boolean hasOngoingOrPendingTasks()
-
forceShutdown
public void forceShutdown()
Shutdowns both compaction and validation executors, cancels running compaction / validation, and waits for tasks to complete if tasks were not cancelable.
-
finishCompactionsAndShutdown
public void finishCompactionsAndShutdown(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
getBackgroundCompactionCandidate
public org.apache.cassandra.db.compaction.CompactionManager.BackgroundCompactionCandidate getBackgroundCompactionCandidate(ColumnFamilyStore cfs)
-
performScrub
public CompactionManager.AllSSTableOpStatus performScrub(ColumnFamilyStore cfs, boolean skipCorrupted, boolean checkData, int jobs) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
performScrub
public CompactionManager.AllSSTableOpStatus performScrub(ColumnFamilyStore cfs, boolean skipCorrupted, boolean checkData, boolean reinsertOverflowedTTL, int jobs) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
performVerify
public CompactionManager.AllSSTableOpStatus performVerify(ColumnFamilyStore cfs, Verifier.Options options) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
performSSTableRewrite
public CompactionManager.AllSSTableOpStatus performSSTableRewrite(ColumnFamilyStore cfs, boolean skipIfCurrentVersion, long skipIfOlderThanTimestamp, boolean skipIfCompressionMatches, int jobs) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
performSSTableRewrite
public CompactionManager.AllSSTableOpStatus performSSTableRewrite(ColumnFamilyStore cfs, java.util.function.Predicate<SSTableReader> sstableFilter, int jobs) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
Perform SSTable rewrite- Parameters:
sstableFilter- sstables for which predicate returns {@link false} will be excluded- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
performCleanup
public CompactionManager.AllSSTableOpStatus performCleanup(ColumnFamilyStore cfStore, int jobs) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
performGarbageCollection
public CompactionManager.AllSSTableOpStatus performGarbageCollection(ColumnFamilyStore cfStore, CompactionParams.TombstoneOption tombstoneOption, int jobs) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
relocateSSTables
public CompactionManager.AllSSTableOpStatus relocateSSTables(ColumnFamilyStore cfs, int jobs) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedException
-
submitPendingAntiCompaction
public Future<java.lang.Void> submitPendingAntiCompaction(ColumnFamilyStore cfs, RangesAtEndpoint tokenRanges, Refs<SSTableReader> sstables, LifecycleTransaction txn, TimeUUID sessionId, java.util.function.BooleanSupplier isCancelled)
Splits the given token ranges of the given sstables into a pending repair silo
-
performAnticompaction
public void performAnticompaction(ColumnFamilyStore cfs, RangesAtEndpoint replicas, Refs<SSTableReader> validatedForRepair, LifecycleTransaction txn, TimeUUID sessionID, java.util.function.BooleanSupplier isCancelled) throws java.io.IOException
Make sure the {validatedForRepair} are marked for compaction before calling this. Caller must reference the validatedForRepair sstables (via ParentRepairSession.getActiveRepairedSSTableRefs(..)).- Parameters:
cfs-replicas- token ranges to be repairedvalidatedForRepair- SSTables containing the repaired ranges. Should be referenced before passing them.sessionID- the repair session we're anti-compacting forisCancelled- function that indicates if active anti-compaction should be canceled- Throws:
java.lang.InterruptedExceptionjava.io.IOException
-
performMaximal
public void performMaximal(ColumnFamilyStore cfStore, boolean splitOutput)
-
submitMaximal
public java.util.List<Future<?>> submitMaximal(ColumnFamilyStore cfStore, int gcBefore, boolean splitOutput)
-
forceCompaction
public void forceCompaction(ColumnFamilyStore cfStore, java.util.function.Supplier<java.util.Collection<SSTableReader>> sstablesFn, com.google.common.base.Predicate<SSTableReader> sstablesPredicate)
-
forceCompactionForTokenRange
public void forceCompactionForTokenRange(ColumnFamilyStore cfStore, java.util.Collection<Range<Token>> ranges)
Forces a major compaction of specified token ranges of the specified 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:
cfStore- The column family store to be compacted.ranges- The token ranges to be compacted, interpreted as closed intervals.
-
forceCompactionForKey
public void forceCompactionForKey(ColumnFamilyStore cfStore, DecoratedKey key)
-
forceUserDefinedCompaction
public void forceUserDefinedCompaction(java.lang.String dataFiles)
Description copied from interface:CompactionManagerMBeanTriggers the compaction of user specified sstables. You can specify files from various keyspaces and columnfamilies. If you do so, user defined compaction is performed several times to the groups of files in the same keyspace/columnfamily.- Specified by:
forceUserDefinedCompactionin interfaceCompactionManagerMBean- Parameters:
dataFiles- a comma separated list of sstable file to compact. must contain keyspace and columnfamily name in path(for 2.1+) or file name itself.
-
forceUserDefinedCleanup
public void forceUserDefinedCleanup(java.lang.String dataFiles)
Description copied from interface:CompactionManagerMBeanTriggers the cleanup of user specified sstables. You can specify files from various keyspaces and columnfamilies. If you do so, cleanup is performed each file individually- Specified by:
forceUserDefinedCleanupin interfaceCompactionManagerMBean- Parameters:
dataFiles- a comma separated list of sstable file to cleanup. must contain keyspace and columnfamily name in path(for 2.1+) or file name itself.
-
submitUserDefined
public Future<?> submitUserDefined(ColumnFamilyStore cfs, java.util.Collection<Descriptor> dataFiles, int gcBefore)
-
submitValidation
public Future<?> submitValidation(java.util.concurrent.Callable<java.lang.Object> validation)
-
disableAutoCompaction
public void disableAutoCompaction()
-
needsCleanup
public static boolean needsCleanup(SSTableReader sstable, java.util.Collection<Range<Token>> ownedRanges)
Determines if a cleanup would actually remove any data in this SSTable based on a set of owned ranges.
-
createWriter
public static SSTableWriter createWriter(ColumnFamilyStore cfs, File compactionFileLocation, long expectedBloomFilterSize, long repairedAt, TimeUUID pendingRepair, boolean isTransient, SSTableReader sstable, LifecycleTransaction txn)
-
createWriterForAntiCompaction
public static SSTableWriter createWriterForAntiCompaction(ColumnFamilyStore cfs, File compactionFileLocation, int expectedBloomFilterSize, long repairedAt, TimeUUID pendingRepair, boolean isTransient, java.util.Collection<SSTableReader> sstables, ILifecycleTransaction txn)
-
getAntiCompactionIterator
public static CompactionIterator getAntiCompactionIterator(java.util.List<ISSTableScanner> scanners, CompactionController controller, int nowInSec, TimeUUID timeUUID, ActiveCompactionsTracker activeCompactions, java.util.function.BooleanSupplier isCancelled)
-
submitIndexBuild
public Future<?> submitIndexBuild(SecondaryIndexBuilder builder)
Is not scheduled, because it is performing disjoint work from sstable compaction.
-
submitCacheWrite
public Future<?> submitCacheWrite(AutoSavingCache.Writer writer)
-
runIndexSummaryRedistribution
public java.util.List<SSTableReader> runIndexSummaryRedistribution(IndexSummaryRedistribution redistribution) throws java.io.IOException
- Throws:
java.io.IOException
-
getDefaultGcBefore
public static int getDefaultGcBefore(ColumnFamilyStore cfs, int nowInSec)
-
submitViewBuilder
public Future<java.lang.Long> submitViewBuilder(ViewBuilderTask task)
-
getActiveCompactions
public int getActiveCompactions()
-
isCompactor
public static boolean isCompactor(java.lang.Thread thread)
-
incrementAborted
public void incrementAborted()
-
incrementCompactionsReduced
public void incrementCompactionsReduced()
-
incrementSstablesDropppedFromCompactions
public void incrementSstablesDropppedFromCompactions(long num)
-
getCompactions
public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getCompactions()
Description copied from interface:CompactionManagerMBeanList of running compaction objects.- Specified by:
getCompactionsin interfaceCompactionManagerMBean
-
getCompactionSummary
public java.util.List<java.lang.String> getCompactionSummary()
Description copied from interface:CompactionManagerMBeanList of running compaction summary strings.- Specified by:
getCompactionSummaryin interfaceCompactionManagerMBean
-
getCompactionHistory
public javax.management.openmbean.TabularData getCompactionHistory()
Description copied from interface:CompactionManagerMBeancompaction history- Specified by:
getCompactionHistoryin interfaceCompactionManagerMBean
-
getTotalBytesCompacted
public long getTotalBytesCompacted()
-
getTotalCompactionsCompleted
public long getTotalCompactionsCompleted()
-
getPendingTasks
public int getPendingTasks()
-
getCompletedTasks
public long getCompletedTasks()
-
stopCompaction
public void stopCompaction(java.lang.String type)
Description copied from interface:CompactionManagerMBeanStop all running compaction-like tasks having the providedtype.- Specified by:
stopCompactionin interfaceCompactionManagerMBean- Parameters:
type- the type of compaction to stop. Can be one of: - COMPACTION - VALIDATION - CLEANUP - SCRUB - INDEX_BUILD
-
stopCompactionById
public void stopCompactionById(java.lang.String compactionId)
Description copied from interface:CompactionManagerMBeanStop an individual running compaction using the compactionId.- Specified by:
stopCompactionByIdin interfaceCompactionManagerMBean- Parameters:
compactionId- Compaction ID of compaction to stop. Such IDs can be found in the transaction log files whose name starts with compaction_, located in the table transactions folder.
-
setConcurrentCompactors
public void setConcurrentCompactors(int value)
-
setConcurrentValidations
public void setConcurrentValidations()
-
setConcurrentViewBuilders
public void setConcurrentViewBuilders(int value)
-
getCoreCompactorThreads
public int getCoreCompactorThreads()
Description copied from interface:CompactionManagerMBeanReturns core size of compaction thread pool- Specified by:
getCoreCompactorThreadsin interfaceCompactionManagerMBean
-
setCoreCompactorThreads
public void setCoreCompactorThreads(int number)
Description copied from interface:CompactionManagerMBeanAllows user to resize maximum size of the compaction thread pool.- Specified by:
setCoreCompactorThreadsin interfaceCompactionManagerMBean- Parameters:
number- New maximum of compaction threads
-
getMaximumCompactorThreads
public int getMaximumCompactorThreads()
Description copied from interface:CompactionManagerMBeanReturns maximum size of compaction thread pool- Specified by:
getMaximumCompactorThreadsin interfaceCompactionManagerMBean
-
setMaximumCompactorThreads
public void setMaximumCompactorThreads(int number)
Description copied from interface:CompactionManagerMBeanAllows user to resize maximum size of the compaction thread pool.- Specified by:
setMaximumCompactorThreadsin interfaceCompactionManagerMBean- Parameters:
number- New maximum of compaction threads
-
getCoreValidationThreads
public int getCoreValidationThreads()
Description copied from interface:CompactionManagerMBeanReturns core size of validation thread pool- Specified by:
getCoreValidationThreadsin interfaceCompactionManagerMBean
-
setCoreValidationThreads
public void setCoreValidationThreads(int number)
Description copied from interface:CompactionManagerMBeanAllows user to resize maximum size of the compaction thread pool.- Specified by:
setCoreValidationThreadsin interfaceCompactionManagerMBean- Parameters:
number- New maximum of compaction threads
-
getMaximumValidatorThreads
public int getMaximumValidatorThreads()
Description copied from interface:CompactionManagerMBeanReturns size of validator thread pool- Specified by:
getMaximumValidatorThreadsin interfaceCompactionManagerMBean
-
setMaximumValidatorThreads
public void setMaximumValidatorThreads(int number)
Description copied from interface:CompactionManagerMBeanAllows user to resize maximum size of the validator thread pool.- Specified by:
setMaximumValidatorThreadsin interfaceCompactionManagerMBean- Parameters:
number- New maximum of validator threads
-
getDisableSTCSInL0
public boolean getDisableSTCSInL0()
Description copied from interface:CompactionManagerMBeanEnable / disable STCS in L0- Specified by:
getDisableSTCSInL0in interfaceCompactionManagerMBean
-
setDisableSTCSInL0
public void setDisableSTCSInL0(boolean disabled)
- Specified by:
setDisableSTCSInL0in interfaceCompactionManagerMBean
-
getCoreViewBuildThreads
public int getCoreViewBuildThreads()
Description copied from interface:CompactionManagerMBeanReturns core size of view build thread pool- Specified by:
getCoreViewBuildThreadsin interfaceCompactionManagerMBean
-
setCoreViewBuildThreads
public void setCoreViewBuildThreads(int number)
Description copied from interface:CompactionManagerMBeanAllows user to resize maximum size of the view build thread pool.- Specified by:
setCoreViewBuildThreadsin interfaceCompactionManagerMBean- Parameters:
number- New maximum of view build threads
-
getMaximumViewBuildThreads
public int getMaximumViewBuildThreads()
Description copied from interface:CompactionManagerMBeanReturns size of view build thread pool- Specified by:
getMaximumViewBuildThreadsin interfaceCompactionManagerMBean
-
setMaximumViewBuildThreads
public void setMaximumViewBuildThreads(int number)
Description copied from interface:CompactionManagerMBeanAllows user to resize maximum size of the view build thread pool.- Specified by:
setMaximumViewBuildThreadsin interfaceCompactionManagerMBean- Parameters:
number- New maximum of view build threads
-
getAutomaticSSTableUpgradeEnabled
public boolean getAutomaticSSTableUpgradeEnabled()
Description copied from interface:CompactionManagerMBeanGet automatic sstable upgrade enabled- Specified by:
getAutomaticSSTableUpgradeEnabledin interfaceCompactionManagerMBean
-
setAutomaticSSTableUpgradeEnabled
public void setAutomaticSSTableUpgradeEnabled(boolean enabled)
Description copied from interface:CompactionManagerMBeanSet if automatic sstable upgrade should be enabled- Specified by:
setAutomaticSSTableUpgradeEnabledin interfaceCompactionManagerMBean
-
getMaxConcurrentAutoUpgradeTasks
public int getMaxConcurrentAutoUpgradeTasks()
Description copied from interface:CompactionManagerMBeanGet the number of concurrent sstable upgrade tasks we should run when automatic sstable upgrades are enabled- Specified by:
getMaxConcurrentAutoUpgradeTasksin interfaceCompactionManagerMBean
-
setMaxConcurrentAutoUpgradeTasks
public void setMaxConcurrentAutoUpgradeTasks(int value)
Description copied from interface:CompactionManagerMBeanSet the number of concurrent sstable upgrade tasks we should run when automatic sstable upgrades are enabled- Specified by:
setMaxConcurrentAutoUpgradeTasksin interfaceCompactionManagerMBean
-
interruptCompactionFor
public void interruptCompactionFor(java.lang.Iterable<TableMetadata> columnFamilies, java.util.function.Predicate<SSTableReader> sstablePredicate, boolean interruptValidation)
Try to stop all of the compactions for given ColumnFamilies. Note that this method does not wait for all compactions to finish; you'll need to loop against isCompacting if you want that behavior.- Parameters:
columnFamilies- The ColumnFamilies to try to stop compaction upon.sstablePredicate- the sstable predicate to match oninterruptValidation- true if validation operations for repair should also be interrupted
-
interruptCompactionForCFs
public void interruptCompactionForCFs(java.lang.Iterable<ColumnFamilyStore> cfss, java.util.function.Predicate<SSTableReader> sstablePredicate, boolean interruptValidation)
-
waitForCessation
public void waitForCessation(java.lang.Iterable<ColumnFamilyStore> cfss, java.util.function.Predicate<SSTableReader> sstablePredicate)
-
getSSTableTasks
public java.util.List<CompactionInfo> getSSTableTasks()
-
isGlobalCompactionPaused
public boolean isGlobalCompactionPaused()
Return whether "global" compactions should be paused, used by ColumnFamilyStore#runWithCompactionsDisabled a global compaction is one that includes several/all tables, currently only IndexSummaryBuilder
-
pauseGlobalCompaction
public CompactionManager.CompactionPauser pauseGlobalCompaction()
-
-