Class SplittingSizeTieredCompactionWriter
java.lang.Object
org.apache.cassandra.utils.concurrent.Transactional.AbstractTransactional
org.apache.cassandra.db.compaction.writers.CompactionAwareWriter
org.apache.cassandra.db.compaction.writers.SplittingSizeTieredCompactionWriter
- All Implemented Interfaces:
AutoCloseable,Transactional
CompactionAwareWriter that splits input in differently sized sstables
Biggest sstable will be total_compaction_size / 2, second biggest total_compaction_size / 4 etc until
the result would be sub 50MiB, all those are put in the same
-
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
FieldsFields inherited from class org.apache.cassandra.db.compaction.writers.CompactionAwareWriter
cfs, currentDirectory, directories, estimatedTotalKeys, isTransient, maxAge, minRepairedAt, nonExpiredSSTables, pendingRepair, sstableWriter, txn -
Constructor Summary
ConstructorsConstructorDescriptionSplittingSizeTieredCompactionWriter(ColumnFamilyStore cfs, Directories directories, LifecycleTransaction txn, Set<SSTableReader> nonExpiredSSTables) SplittingSizeTieredCompactionWriter(ColumnFamilyStore cfs, Directories directories, LifecycleTransaction txn, Set<SSTableReader> nonExpiredSSTables, long smallestSSTable) -
Method Summary
Modifier and TypeMethodDescriptionprotected longprotected 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.Methods inherited from class org.apache.cassandra.db.compaction.writers.CompactionAwareWriter
append, doAbort, doCommit, doPostCleanup, doPrepare, estimatedKeys, finish, getDirectories, getSStableDirectory, getWriteDirectory, maybeSwitchLocation, maybeSwitchWriter, newWriterBuilder, realAppend, setRepairedAt, sstableWriter, switchCompactionWriterMethods 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
-
Field Details
-
DEFAULT_SMALLEST_SSTABLE_BYTES
public static final long DEFAULT_SMALLEST_SSTABLE_BYTES- See Also:
-
-
Constructor Details
-
SplittingSizeTieredCompactionWriter
public SplittingSizeTieredCompactionWriter(ColumnFamilyStore cfs, Directories directories, LifecycleTransaction txn, Set<SSTableReader> nonExpiredSSTables) -
SplittingSizeTieredCompactionWriter
public SplittingSizeTieredCompactionWriter(ColumnFamilyStore cfs, Directories directories, LifecycleTransaction txn, Set<SSTableReader> nonExpiredSSTables, long smallestSSTable)
-
-
Method Details
-
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
-
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
-