org.apache.cassandra.db
Class DataTracker
java.lang.Object
org.apache.cassandra.db.DataTracker
public class DataTracker
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
subscribers
public final java.util.Collection<INotificationConsumer> subscribers
cfstore
public final ColumnFamilyStore cfstore
DataTracker
public DataTracker(ColumnFamilyStore cfstore)
getMemtable
public Memtable getMemtable()
getMemtablesPendingFlush
public java.util.Set<Memtable> getMemtablesPendingFlush()
getSSTables
public java.util.Set<SSTableReader> getSSTables()
getUncompactingSSTables
public java.util.Set<SSTableReader> getUncompactingSSTables()
getView
public org.apache.cassandra.db.DataTracker.View getView()
switchMemtable
public Memtable switchMemtable()
- Switch the current memtable.
This atomically adds the current memtable to the memtables pending
flush and replace it with a fresh memtable.
- Returns:
- the previous current memtable (the one added to the pending
flush)
renewMemtable
public void renewMemtable()
- Renew the current memtable without putting the old one for a flush.
Used when we flush but a memtable is clean (in which case we must
change it because it was frozen).
replaceFlushed
public void replaceFlushed(Memtable memtable,
SSTableReader sstable)
maybeIncrementallyBackup
public void maybeIncrementallyBackup(SSTableReader sstable)
markCompacting
public boolean markCompacting(java.util.Collection<SSTableReader> sstables)
- Returns:
- true if we are able to mark the given @param sstables as compacted, before anyone else
Note that we could acquire references on the marked sstables and release them in
unmarkCompacting, but since we will never call markCompacted on a sstable marked
as compacting (unless there is a serious bug), we can skip this.
unmarkCompacting
public void unmarkCompacting(java.util.Collection<SSTableReader> unmark)
- Removes files from compacting status: this is different from 'markCompacted'
because it should be run regardless of whether a compaction succeeded.
markCompacted
public void markCompacted(java.util.Collection<SSTableReader> sstables,
OperationType compactionType)
replaceCompactedSSTables
public void replaceCompactedSSTables(java.util.Collection<SSTableReader> sstables,
java.lang.Iterable<SSTableReader> replacements,
OperationType compactionType)
addInitialSSTables
public void addInitialSSTables(java.util.Collection<SSTableReader> sstables)
addSSTables
public void addSSTables(java.util.Collection<SSTableReader> sstables)
unreferenceSSTables
public void unreferenceSSTables()
- removes all sstables that are not busy compacting.
spaceReclaimed
public void spaceReclaimed(long size)
estimatedKeys
public long estimatedKeys()
getMeanColumns
public int getMeanColumns()
getDroppableTombstoneRatio
public double getDroppableTombstoneRatio()
notifySSTablesChanged
public void notifySSTablesChanged(java.lang.Iterable<SSTableReader> removed,
java.lang.Iterable<SSTableReader> added,
OperationType compactionType)
notifyAdded
public void notifyAdded(SSTableReader added)
subscribe
public void subscribe(INotificationConsumer consumer)
unsubscribe
public void unsubscribe(INotificationConsumer consumer)
buildIntervalTree
public static DataTracker.SSTableIntervalTree buildIntervalTree(java.lang.Iterable<SSTableReader> sstables)
getCompacting
public java.util.Set<SSTableReader> getCompacting()
Copyright © 2013 The Apache Software Foundation