ark::logging::ColumnWriter

Defined in header “ark/logging/column_writer.hh”.


A column writer is in charge of writing out data that belongs to a particular column type, tracking the individual splits and any metadata related to this column.

Methods

  • ColumnWriter(ColumnWriterConfiguration config)
    Constructor. Initializes a new column writer against the specified configuration.

  • ~ColumnWriter()
    Destructor. This may throw, if you haven’t previously called close() on this object.

  • void flush()
    Flushes the column writer, ensuring everything is written out to disk. The active split writer will be flushed (but remain active).

  • void close()
    Closes the column writer. No further changes can be written out. This could potentially fail (particularly if you haven’t invoked flush()). If it fails, your changes are lost. The underlying file descriptor is closed even if errors are experienced during closing.

  • const ColumnConfiguration & config()
    Returns the configuration of this writer.

  • std::vector< SplitDeclaration > split_declarations()
    Returns all of the split declarations for this column writer.

  • ColumnWriterStatistics statistics()
    Returns statistics related to this column writer.

  • size_t write(const ObjectDeclaration & declaration, const LoggingClock::time_point & indexed_time, const core::ByteBuffer & data)
    Writes the given data out to the specified declaration. It will be indexed according to the time specified.

    If a new split is needed, it could potentially be created at this point. Returns the number of bytes actually written.