Class MaxSSTableSizeWriter
- java.lang.Object
-
- org.apache.cassandra.utils.concurrent.Transactional.AbstractTransactional
-
- org.apache.cassandra.db.compaction.writers.CompactionAwareWriter
-
- org.apache.cassandra.db.compaction.writers.MaxSSTableSizeWriter
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,Transactional
public class MaxSSTableSizeWriter extends CompactionAwareWriter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.utils.concurrent.Transactional.AbstractTransactional
Transactional.AbstractTransactional.State
-
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.Transactional
Transactional.AbstractTransactional
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.db.compaction.writers.CompactionAwareWriter
cfs, directories, estimatedTotalKeys, isTransient, logger, maxAge, minRepairedAt, nonExpiredSSTables, pendingRepair, sstableWriter, txn
-
-
Constructor Summary
Constructors Constructor Description MaxSSTableSizeWriter(ColumnFamilyStore cfs, Directories directories, LifecycleTransaction txn, java.util.Set<SSTableReader> nonExpiredSSTables, long maxSSTableSize, int level)
MaxSSTableSizeWriter(ColumnFamilyStore cfs, Directories directories, LifecycleTransaction txn, java.util.Set<SSTableReader> nonExpiredSSTables, long maxSSTableSize, int level, boolean keepOriginals)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
getExpectedWriteSize()
protected boolean
realAppend(UnfilteredRowIterator partition)
void
switchCompactionLocation(Directories.DataDirectory location)
Implementations of this method should finish the current sstable writer and start writing to this directory.-
Methods inherited from class org.apache.cassandra.db.compaction.writers.CompactionAwareWriter
append, doAbort, doCommit, doPostCleanup, doPrepare, estimatedKeys, finish, getDirectories, getWriteDirectory, maybeSwitchWriter, setRepairedAt
-
Methods inherited from class org.apache.cassandra.utils.concurrent.Transactional.AbstractTransactional
abort, abort, close, commit, commit, doPreCleanup, prepareToCommit, state
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.utils.concurrent.Transactional
abort, close, commit, prepareToCommit
-
-
-
-
Constructor Detail
-
MaxSSTableSizeWriter
public MaxSSTableSizeWriter(ColumnFamilyStore cfs, Directories directories, LifecycleTransaction txn, java.util.Set<SSTableReader> nonExpiredSSTables, long maxSSTableSize, int level)
-
MaxSSTableSizeWriter
public MaxSSTableSizeWriter(ColumnFamilyStore cfs, Directories directories, LifecycleTransaction txn, java.util.Set<SSTableReader> nonExpiredSSTables, long maxSSTableSize, int level, boolean keepOriginals)
-
-
Method Detail
-
realAppend
protected boolean realAppend(UnfilteredRowIterator partition)
- Specified by:
realAppend
in classCompactionAwareWriter
-
switchCompactionLocation
public void switchCompactionLocation(Directories.DataDirectory location)
Description copied from class:CompactionAwareWriter
Implementations of this method should finish the current sstable writer and start writing to this directory. Called once before starting to append and then whenever we see a need to start writing to another directory.- Specified by:
switchCompactionLocation
in classCompactionAwareWriter
-
getExpectedWriteSize
protected long getExpectedWriteSize()
- Overrides:
getExpectedWriteSize
in classCompactionAwareWriter
-
-