Class SSTableWriter

  • All Implemented Interfaces:
    java.lang.AutoCloseable, Transactional
    Direct Known Subclasses:
    BigTableWriter

    public abstract class SSTableWriter
    extends SSTable
    implements Transactional
    This is the API all table writers must implement. TableWriter.create() is the primary way to create a writer for a particular format. The format information is part of the Descriptor.
    • Method Detail

      • mark

        public abstract void mark()
      • append

        public abstract RowIndexEntry append​(UnfilteredRowIterator iterator)
        Appends partition data to this writer.
        Parameters:
        iterator - the partition to write
        Returns:
        the created index entry if something was written, that is if iterator wasn't empty, null otherwise.
        Throws:
        FSWriteError - if a write to the dataFile fails
      • getFilePointer

        public abstract long getFilePointer()
      • getOnDiskFilePointer

        public abstract long getOnDiskFilePointer()
      • getEstimatedOnDiskBytesWritten

        public long getEstimatedOnDiskBytesWritten()
      • resetAndTruncate

        public abstract void resetAndTruncate()
      • setRepairedAt

        public SSTableWriter setRepairedAt​(long repairedAt)
      • setMaxDataAge

        public SSTableWriter setMaxDataAge​(long maxDataAge)
      • setOpenResult

        public SSTableWriter setOpenResult​(boolean openResult)
      • openEarly

        public abstract SSTableReader openEarly()
        Open the resultant SSTableReader before it has been fully written
      • openFinalEarly

        public abstract SSTableReader openFinalEarly()
        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 ready
      • finish

        public SSTableReader finish​(long repairedAt,
                                    long maxDataAge,
                                    boolean openResult)
      • finished

        public SSTableReader finished()
        Open the resultant SSTableReader once it has been fully written, and all related state is ready to be finalised including other sstables being written involved in the same operation
      • commit

        public final java.lang.Throwable commit​(java.lang.Throwable accumulate)
        Specified by:
        commit in interface Transactional
      • abort

        public final java.lang.Throwable abort​(java.lang.Throwable accumulate)
        Specified by:
        abort in interface Transactional
      • close

        public final void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface Transactional
      • abort

        public final void abort()
      • releaseMetadataOverhead

        public void releaseMetadataOverhead()