iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
iceberg::ManifestListWriter Class Reference

Write manifest files to a manifest list file. More...

#include <manifest_writer.h>

Public Member Functions

Status Add (const ManifestFile &file)
 Write manifest file to manifest list file.
 
Status AddAll (const std::vector< ManifestFile > &files)
 Write manifest file list to manifest list file.
 
Status Close ()
 Close writer and flush to storage.
 
std::optional< int64_t > next_row_id () const
 Get the next row id to assign.
 

Static Public Member Functions

static Result< std::unique_ptr< ManifestListWriter > > MakeWriter (int8_t format_version, int64_t snapshot_id, std::optional< int64_t > parent_snapshot_id, std::string_view manifest_list_location, std::shared_ptr< FileIO > file_io, std::optional< int64_t > sequence_number=std::nullopt, std::optional< int64_t > first_row_id=std::nullopt)
 Factory function to create a writer for the manifest list based on format version.
 

Detailed Description

Write manifest files to a manifest list file.

Member Function Documentation

◆ Add()

Status iceberg::ManifestListWriter::Add ( const ManifestFile file)

Write manifest file to manifest list file.

Parameters
fileManifest file to write.
Returns
Status indicating success or failure

◆ AddAll()

Status iceberg::ManifestListWriter::AddAll ( const std::vector< ManifestFile > &  files)

Write manifest file list to manifest list file.

Parameters
filesManifest file list to write.
Returns
Status indicating success or failure

◆ MakeWriter()

Result< std::unique_ptr< ManifestListWriter > > iceberg::ManifestListWriter::MakeWriter ( int8_t  format_version,
int64_t  snapshot_id,
std::optional< int64_t >  parent_snapshot_id,
std::string_view  manifest_list_location,
std::shared_ptr< FileIO file_io,
std::optional< int64_t >  sequence_number = std::nullopt,
std::optional< int64_t >  first_row_id = std::nullopt 
)
static

Factory function to create a writer for the manifest list based on format version.

Parameters
format_versionThe format version (1, 2, 3, etc.).
snapshot_idID of the snapshot.
parent_snapshot_idID of the parent snapshot.
manifest_list_locationPath to the manifest list file.
file_ioFile IO implementation to use.
sequence_numberSequence number of the snapshot (required for format_version >= 2).
first_row_idFirst row ID of the snapshot (required for format_version >= 3).
Returns
A Result containing the writer or an error.

The documentation for this class was generated from the following files: