Class BigTableWriter
java.lang.Object
org.apache.cassandra.io.sstable.SSTable
org.apache.cassandra.io.sstable.format.SSTableWriter
org.apache.cassandra.io.sstable.format.SortedTableWriter<BigFormatPartitionWriter,BigTableWriter.IndexWriter>
org.apache.cassandra.io.sstable.format.big.BigTableWriter
- All Implemented Interfaces:
AutoCloseable,Transactional
public class BigTableWriter
extends SortedTableWriter<BigFormatPartitionWriter,BigTableWriter.IndexWriter>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprotected static classEncapsulates writing the index and filter for an SSTable.Nested classes/interfaces inherited from class org.apache.cassandra.io.sstable.format.SortedTableWriter
SortedTableWriter.AbstractIndexWriter, SortedTableWriter.TransactionalProxyNested classes/interfaces inherited from class org.apache.cassandra.io.sstable.format.SSTableWriter
SSTableWriter.SSTableSizeParametersNested classes/interfaces inherited from class org.apache.cassandra.io.sstable.SSTable
SSTable.OwnerNested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.Transactional
Transactional.AbstractTransactional -
Field Summary
Fields inherited from class org.apache.cassandra.io.sstable.format.SortedTableWriter
dataWriter, indexWriter, partitionWriterFields inherited from class org.apache.cassandra.io.sstable.format.SSTableWriter
first, header, isTransient, keyCount, last, lifecycleNewTracker, maxDataAge, metadataCollector, mmappedRegionsCache, observers, pendingRepair, repairedAt, txnProxyFields inherited from class org.apache.cassandra.io.sstable.SSTable
chunkCache, components, compression, descriptor, ioOptions, metadata, TOMBSTONE_HISTOGRAM_BIN_SIZE, TOMBSTONE_HISTOGRAM_SPOOL_SIZE, TOMBSTONE_HISTOGRAM_TTL_ROUND_SECONDS -
Constructor Summary
ConstructorsConstructorDescriptionBigTableWriter(BigTableWriter.Builder builder, LifecycleNewTracker lifecycleNewTracker, SSTable.Owner owner) -
Method Summary
Modifier and TypeMethodDescriptionprotected RowIndexEntrycreateRowIndexEntry(DecoratedKey key, DeletionTime partitionLevelDeletion, long finishResult) protected voidvoidopenEarly(Consumer<SSTableReader> doWhenReady) Open the resultant SSTableReader before it has been fully written.openFinal(SSTableReader.OpenReason openReason) Open the resultant SSTableReader once it has been fully written, but before the _set_ of tables that are being written together as one atomic operation are all readyMethods inherited from class org.apache.cassandra.io.sstable.format.SortedTableWriter
append, getEstimatedOnDiskBytesWritten, getFilePointer, getOnDiskFilePointer, mark, notifyObservers, onRangeTombstoneMarker, onRow, onStaticRow, openDataFile, resetAndTruncate, txnProxyMethods inherited from class org.apache.cassandra.io.sstable.format.SSTableWriter
abort, abort, close, commit, finalizeMetadata, finish, finished, getBounds, getFirst, getLast, handleConstructionFailure, onSSTableWriterSwitched, prepareToCommit, releaseMetadataOverhead, setMaxDataAge, setOpenResult, setRepairedAt, setTokenSpaceCoverage, statsMetadataMethods inherited from class org.apache.cassandra.io.sstable.SSTable
addComponents, copy, decorateKey, getAllFilePaths, getColumnFamilyName, getComponents, getFilename, getId, getKeyspaceName, getPartitioner, getStreamingComponents, hardlink, metadata, owner, registerComponents, rename, toString, tryComponentFromFilename, tryComponentFromFilename, tryDescriptorFromFile, unbuildTo, unregisterComponents, validateRepairedMetadata
-
Constructor Details
-
BigTableWriter
public BigTableWriter(BigTableWriter.Builder builder, LifecycleNewTracker lifecycleNewTracker, SSTable.Owner owner)
-
-
Method Details
-
onStartPartition
- Overrides:
onStartPartitionin classSortedTableWriter<BigFormatPartitionWriter,BigTableWriter.IndexWriter>
-
createRowIndexEntry
protected RowIndexEntry createRowIndexEntry(DecoratedKey key, DeletionTime partitionLevelDeletion, long finishResult) throws IOException - Specified by:
createRowIndexEntryin classSortedTableWriter<BigFormatPartitionWriter,BigTableWriter.IndexWriter> - Throws:
IOException
-
openEarly
Description copied from class:SSTableWriterOpen the resultant SSTableReader before it has been fully written.The passed consumer will be called when the necessary data has been flushed to disk/cache. This may never happen (e.g. if the table was finished before the flushes materialized, or if this call returns false e.g. if a table was already prepared but hasn't reached readiness yet).
Uses callback instead of future because preparation and callback happen on the same thread.
- Specified by:
openEarlyin classSSTableWriter
-
openFinalEarly
Description copied from class:SSTableWriterOpen the resultant SSTableReader once it has been fully written, but before the _set_ of tables that are being written together as one atomic operation are all ready- Specified by:
openFinalEarlyin classSSTableWriter
-
openFinal
- Specified by:
openFinalin classSSTableWriter
-