public class CompactionController
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Field and Description |
---|---|
ColumnFamilyStore |
cfs |
int |
gcBefore |
Modifier | Constructor and Description |
---|---|
protected |
CompactionController(ColumnFamilyStore cfs,
int maxValue) |
|
CompactionController(ColumnFamilyStore cfs,
java.util.Set<SSTableReader> compacting,
int gcBefore) |
|
CompactionController(ColumnFamilyStore cfs,
java.util.Set<SSTableReader> compacting,
int gcBefore,
com.google.common.util.concurrent.RateLimiter limiter,
CompactionParams.TombstoneOption tombstoneOption) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
compactingRepaired() |
java.lang.String |
getColumnFamily() |
java.util.Set<SSTableReader> |
getFullyExpiredSSTables() |
static java.util.Set<SSTableReader> |
getFullyExpiredSSTables(ColumnFamilyStore cfStore,
java.lang.Iterable<SSTableReader> compacting,
java.lang.Iterable<SSTableReader> overlapping,
int gcBefore)
Finds expired sstables
works something like this;
1.
|
java.lang.String |
getKeyspace() |
java.util.function.Predicate<java.lang.Long> |
getPurgeEvaluator(DecoratedKey key) |
void |
maybeRefreshOverlaps() |
java.lang.Iterable<UnfilteredRowIterator> |
shadowSources(DecoratedKey key,
boolean tombstoneOnly) |
public final ColumnFamilyStore cfs
public final int gcBefore
protected CompactionController(ColumnFamilyStore cfs, int maxValue)
public CompactionController(ColumnFamilyStore cfs, java.util.Set<SSTableReader> compacting, int gcBefore)
public CompactionController(ColumnFamilyStore cfs, java.util.Set<SSTableReader> compacting, int gcBefore, com.google.common.util.concurrent.RateLimiter limiter, CompactionParams.TombstoneOption tombstoneOption)
public void maybeRefreshOverlaps()
public java.util.Set<SSTableReader> getFullyExpiredSSTables()
public static java.util.Set<SSTableReader> getFullyExpiredSSTables(ColumnFamilyStore cfStore, java.lang.Iterable<SSTableReader> compacting, java.lang.Iterable<SSTableReader> overlapping, int gcBefore)
(maxTimestamp < global minTimestamp)
- if not droppable, remove from candidates
4. return candidates.cfStore
- compacting
- we take the drop-candidates from this set, it is usually the sstables included in the compactionoverlapping
- the sstables that overlap the ones in compacting.gcBefore
- public java.lang.String getKeyspace()
public java.lang.String getColumnFamily()
public java.util.function.Predicate<java.lang.Long> getPurgeEvaluator(DecoratedKey key)
key
- public void close()
close
in interface java.lang.AutoCloseable
public boolean compactingRepaired()
public java.lang.Iterable<UnfilteredRowIterator> shadowSources(DecoratedKey key, boolean tombstoneOnly)
Copyright © 2017 The Apache Software Foundation