Class MajorLeveledCompactionWriter
java.lang.Object
org.apache.cassandra.utils.concurrent.Transactional.AbstractTransactional
org.apache.cassandra.db.compaction.writers.CompactionAwareWriter
org.apache.cassandra.db.compaction.writers.MajorLeveledCompactionWriter
- All Implemented Interfaces:
AutoCloseable,Transactional
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.cassandra.utils.concurrent.Transactional.AbstractTransactional
Transactional.AbstractTransactional.StateNested 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, currentDirectory, directories, estimatedTotalKeys, isTransient, logger, maxAge, minRepairedAt, nonExpiredSSTables, pendingRepair, sstableWriter, txn -
Constructor Summary
ConstructorsConstructorDescriptionMajorLeveledCompactionWriter(ColumnFamilyStore cfs, Directories directories, LifecycleTransaction txn, Set<SSTableReader> nonExpiredSSTables, long maxSSTableSize) MajorLeveledCompactionWriter(ColumnFamilyStore cfs, Directories directories, LifecycleTransaction txn, Set<SSTableReader> nonExpiredSSTables, long maxSSTableSize, boolean keepOriginals) -
Method Summary
Modifier and TypeMethodDescriptionprotected longbooleanrealAppend(UnfilteredRowIterator partition) protected booleanReturns true if the writer should be switched for reasons other than switching to a new data directory (e.g.protected longReturns the key count with which created sstables should be set up.protected intReturns the level that should be used when creating sstables.voidswitchCompactionWriter(Directories.DataDirectory location, DecoratedKey nextKey) 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, getSStableDirectory, getWriteDirectory, maybeSwitchLocation, maybeSwitchWriter, newWriterBuilder, setRepairedAt, sstableWriterMethods inherited from class org.apache.cassandra.utils.concurrent.Transactional.AbstractTransactional
abort, abort, close, commit, commit, doPreCleanup, prepareToCommit, stateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.utils.concurrent.Transactional
abort, close, commit, prepareToCommit
-
Constructor Details
-
MajorLeveledCompactionWriter
public MajorLeveledCompactionWriter(ColumnFamilyStore cfs, Directories directories, LifecycleTransaction txn, Set<SSTableReader> nonExpiredSSTables, long maxSSTableSize) -
MajorLeveledCompactionWriter
public MajorLeveledCompactionWriter(ColumnFamilyStore cfs, Directories directories, LifecycleTransaction txn, Set<SSTableReader> nonExpiredSSTables, long maxSSTableSize, boolean keepOriginals)
-
-
Method Details
-
realAppend
- Overrides:
realAppendin classCompactionAwareWriter
-
shouldSwitchWriterInCurrentLocation
Description copied from class:CompactionAwareWriterReturns true if the writer should be switched for reasons other than switching to a new data directory (e.g. because an sstable size limit has been reached).- Specified by:
shouldSwitchWriterInCurrentLocationin classCompactionAwareWriter
-
switchCompactionWriter
Description copied from class:CompactionAwareWriterImplementations 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.
- Overrides:
switchCompactionWriterin classCompactionAwareWriter
-
sstableLevel
protected int sstableLevel()Description copied from class:CompactionAwareWriterReturns the level that should be used when creating sstables.- Overrides:
sstableLevelin classCompactionAwareWriter
-
sstableKeyCount
protected long sstableKeyCount()Description copied from class:CompactionAwareWriterReturns the key count with which created sstables should be set up.- Specified by:
sstableKeyCountin classCompactionAwareWriter
-
getExpectedWriteSize
protected long getExpectedWriteSize()- Overrides:
getExpectedWriteSizein classCompactionAwareWriter
-