Class BigTableWriter
- java.lang.Object
-
- org.apache.cassandra.io.sstable.SSTable
-
- org.apache.cassandra.io.sstable.format.SSTableWriter
-
- org.apache.cassandra.io.sstable.format.big.BigTableWriter
-
- All Implemented Interfaces:
java.lang.AutoCloseable,Transactional
public class BigTableWriter extends SSTableWriter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.io.sstable.format.SSTableWriter
SSTableWriter.Factory, SSTableWriter.SSTableSizeParameters
-
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.Transactional
Transactional.AbstractTransactional
-
-
Field Summary
Fields Modifier and Type Field Description protected SequentialWriterdataFile-
Fields inherited from class org.apache.cassandra.io.sstable.format.SSTableWriter
header, isTransient, keyCount, maxDataAge, metadataCollector, observers, pendingRepair, repairedAt, rowIndexEntrySerializer, txnProxy
-
Fields inherited from class org.apache.cassandra.io.sstable.SSTable
components, compression, descriptor, first, last, metadata, optimizationStrategy, TOMBSTONE_HISTOGRAM_BIN_SIZE, TOMBSTONE_HISTOGRAM_SPOOL_SIZE, TOMBSTONE_HISTOGRAM_TTL_ROUND_SECONDS
-
-
Constructor Summary
Constructors Constructor Description BigTableWriter(Descriptor descriptor, long keyCount, long repairedAt, TimeUUID pendingRepair, boolean isTransient, TableMetadataRef metadata, MetadataCollector metadataCollector, SerializationHeader header, java.util.Collection<SSTableFlushObserver> observers, LifecycleNewTracker lifecycleNewTracker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RowIndexEntryappend(UnfilteredRowIterator iterator)Appends partition data to this writer.protected longbeforeAppend(DecoratedKey decoratedKey)Perform sanity checks on @param decoratedKey and @return the position in the data file before any data is writtenlonggetEstimatedOnDiskBytesWritten()longgetFilePointer()longgetOnDiskFilePointer()voidmark()SSTableReaderopenEarly()Open the resultant SSTableReader before it has been fully writtenSSTableReaderopenFinalEarly()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 readyvoidresetAndTruncate()protected SSTableWriter.TransactionalProxytxnProxy()-
Methods inherited from class org.apache.cassandra.io.sstable.format.SSTableWriter
abort, abort, close, commit, copy, create, create, create, create, finalizeMetadata, finish, finish, finished, guardCollectionSize, hardlink, prepareToCommit, releaseMetadataOverhead, rename, setMaxDataAge, setOpenResult, setRepairedAt, statsMetadata
-
Methods inherited from class org.apache.cassandra.io.sstable.SSTable
addComponents, appendTOC, bytesOnDisk, componentsFor, decorateKey, delete, discoverComponentsFor, estimateRowsFromIndex, getAllFilePaths, getBounds, getColumnFamilyName, getComponents, getFilename, getIndexFilename, getKeyspaceName, getMinimalKey, getPartitioner, metadata, readTOC, readTOC, toString, tryComponentFromFilename, tryDescriptorFromFilename, validateRepairedMetadata
-
-
-
-
Field Detail
-
dataFile
protected final SequentialWriter dataFile
-
-
Constructor Detail
-
BigTableWriter
public BigTableWriter(Descriptor descriptor, long keyCount, long repairedAt, TimeUUID pendingRepair, boolean isTransient, TableMetadataRef metadata, MetadataCollector metadataCollector, SerializationHeader header, java.util.Collection<SSTableFlushObserver> observers, LifecycleNewTracker lifecycleNewTracker)
-
-
Method Detail
-
mark
public void mark()
- Specified by:
markin classSSTableWriter
-
resetAndTruncate
public void resetAndTruncate()
- Specified by:
resetAndTruncatein classSSTableWriter
-
beforeAppend
protected long beforeAppend(DecoratedKey decoratedKey)
Perform sanity checks on @param decoratedKey and @return the position in the data file before any data is written
-
append
public RowIndexEntry append(UnfilteredRowIterator iterator)
Appends partition data to this writer.- Specified by:
appendin classSSTableWriter- Parameters:
iterator- the partition to write- Returns:
- the created index entry if something was written, that is if
iteratorwasn't empty,nullotherwise. - Throws:
FSWriteError- if a write to the dataFile fails
-
openEarly
public SSTableReader openEarly()
Description copied from class:SSTableWriterOpen the resultant SSTableReader before it has been fully written- Specified by:
openEarlyin classSSTableWriter
-
openFinalEarly
public SSTableReader 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
-
txnProxy
protected SSTableWriter.TransactionalProxy txnProxy()
- Specified by:
txnProxyin classSSTableWriter
-
getFilePointer
public long getFilePointer()
- Specified by:
getFilePointerin classSSTableWriter
-
getOnDiskFilePointer
public long getOnDiskFilePointer()
- Specified by:
getOnDiskFilePointerin classSSTableWriter
-
getEstimatedOnDiskBytesWritten
public long getEstimatedOnDiskBytesWritten()
- Overrides:
getEstimatedOnDiskBytesWrittenin classSSTableWriter
-
-