|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cassandra.db.compaction.CompactionManager
public class CompactionManager
A singleton which manages a private executor of ongoing compactions. A readwrite lock controls whether compactions can proceed: an external consumer can completely stop compactions by acquiring the write half of the lock via getCompactionLock(). Scheduling for compaction is accomplished by swapping sstables to be compacted into a set via DataTracker. New scheduling attempts will ignore currently compacting sstables.
| Nested Class Summary | |
|---|---|
static interface |
CompactionManager.CompactionExecutorStatsCollector
|
| Field Summary | |
|---|---|
static CompactionManager |
instance
|
static java.lang.String |
MBEAN_OBJECT_NAME
|
| Constructor Summary | |
|---|---|
CompactionManager()
|
|
| Method Summary | |
|---|---|
void |
disableAutoCompaction()
|
void |
forceUserDefinedCompaction(java.lang.String ksname,
java.lang.String dataFiles)
Triggers the compaction of user specified sstables. |
int |
getActiveCompactions()
|
java.util.concurrent.locks.Lock |
getCompactionLock()
|
java.util.List<CompactionInfo> |
getCompactions()
List of running compaction objects. |
java.util.List<java.lang.String> |
getCompactionSummary()
List of running compaction summary strings. |
long |
getCompletedTasks()
|
int |
getPendingTasks()
|
void |
performCleanup(ColumnFamilyStore cfStore,
NodeId.OneShotRenewer renewer)
|
void |
performMaximal(ColumnFamilyStore cfStore)
|
void |
performScrub(ColumnFamilyStore cfStore)
|
void |
performSSTableRewrite(ColumnFamilyStore cfStore)
|
java.util.concurrent.Future<java.lang.Integer> |
submitBackground(ColumnFamilyStore cfs)
Call this whenever a compaction might be needed on the given columnfamily. |
java.util.concurrent.Future<?> |
submitCacheWrite(AutoSavingCache.Writer writer)
|
java.util.concurrent.Future<?> |
submitIndexBuild(SecondaryIndexBuilder builder)
Is not scheduled, because it is performing disjoint work from sstable compaction. |
java.util.concurrent.Future<java.lang.Object> |
submitMaximal(ColumnFamilyStore cfStore,
int gcBefore)
|
java.util.concurrent.Future<?> |
submitTruncate(ColumnFamilyStore main,
long truncatedAt)
|
java.util.concurrent.Future<java.lang.Object> |
submitUserDefined(ColumnFamilyStore cfs,
java.util.Collection<Descriptor> dataFiles,
int gcBefore)
|
java.util.concurrent.Future<java.lang.Object> |
submitValidation(ColumnFamilyStore cfStore,
AntiEntropyService.Validator validator)
Does not mutate data, so is not scheduled. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MBEAN_OBJECT_NAME
public static final CompactionManager instance
| Constructor Detail |
|---|
public CompactionManager()
| Method Detail |
|---|
public java.util.concurrent.locks.Lock getCompactionLock()
public java.util.concurrent.Future<java.lang.Integer> submitBackground(ColumnFamilyStore cfs)
public void performScrub(ColumnFamilyStore cfStore)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public void performSSTableRewrite(ColumnFamilyStore cfStore)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public void performCleanup(ColumnFamilyStore cfStore,
NodeId.OneShotRenewer renewer)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public void performMaximal(ColumnFamilyStore cfStore)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public java.util.concurrent.Future<java.lang.Object> submitMaximal(ColumnFamilyStore cfStore,
int gcBefore)
public void forceUserDefinedCompaction(java.lang.String ksname,
java.lang.String dataFiles)
CompactionManagerMBean
forceUserDefinedCompaction in interface CompactionManagerMBeanksname - the keyspace for the sstables to compactdataFiles - a comma separated list of sstable filename to compact
public java.util.concurrent.Future<java.lang.Object> submitUserDefined(ColumnFamilyStore cfs,
java.util.Collection<Descriptor> dataFiles,
int gcBefore)
public java.util.concurrent.Future<java.lang.Object> submitValidation(ColumnFamilyStore cfStore,
AntiEntropyService.Validator validator)
public void disableAutoCompaction()
public java.util.concurrent.Future<?> submitIndexBuild(SecondaryIndexBuilder builder)
public java.util.concurrent.Future<?> submitCacheWrite(AutoSavingCache.Writer writer)
public java.util.concurrent.Future<?> submitTruncate(ColumnFamilyStore main,
long truncatedAt)
public int getActiveCompactions()
public java.util.List<CompactionInfo> getCompactions()
CompactionManagerMBean
getCompactions in interface CompactionManagerMBeanpublic java.util.List<java.lang.String> getCompactionSummary()
CompactionManagerMBean
getCompactionSummary in interface CompactionManagerMBeanpublic int getPendingTasks()
getPendingTasks in interface CompactionManagerMBeanpublic long getCompletedTasks()
getCompletedTasks in interface CompactionManagerMBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||