|
iceberg-cpp
|
Helper class for building snapshot summaries. More...
#include <snapshot.h>
Public Member Functions | |
| void | Clear () |
| Clear all tracked metrics and properties. | |
| void | SetPartitionSummaryLimit (int32_t max) |
| Set the maximum number of changed partitions before partition summaries will be excluded. | |
| void | IncrementDuplicateDeletes (int32_t increment=1) |
| Increment the count of duplicate files deleted by a specific amount. | |
| Status | AddedFile (const PartitionSpec &spec, const DataFile &file) |
| Track a data file being added to the snapshot. | |
| Status | DeletedFile (const PartitionSpec &spec, const DataFile &file) |
| Track a data file being deleted from the snapshot. | |
| void | AddedManifest (const ManifestFile &manifest) |
| Track a manifest being added. | |
| void | Set (const std::string &property, const std::string &value) |
| Set a custom summary property. | |
| void | Merge (const SnapshotSummaryBuilder &other) |
| Merge another builder's metrics into this one. | |
| std::unordered_map< std::string, std::string > | Build () const |
| Build the final summary map. | |
Helper class for building snapshot summaries.
This class provides methods to track changes to data and delete files, and produces a map of summary properties for snapshot metadata.
| Status iceberg::SnapshotSummaryBuilder::AddedFile | ( | const PartitionSpec & | spec, |
| const DataFile & | file | ||
| ) |
Track a data file being added to the snapshot.
| spec | The partition spec |
| file | The data file being added |
| void iceberg::SnapshotSummaryBuilder::AddedManifest | ( | const ManifestFile & | manifest | ) |
Track a manifest being added.
| manifest | The manifest file being added |
| std::unordered_map< std::string, std::string > iceberg::SnapshotSummaryBuilder::Build | ( | ) | const |
Build the final summary map.
| Status iceberg::SnapshotSummaryBuilder::DeletedFile | ( | const PartitionSpec & | spec, |
| const DataFile & | file | ||
| ) |
Track a data file being deleted from the snapshot.
| spec | The partition spec |
| file | The data file being deleted |
| void iceberg::SnapshotSummaryBuilder::IncrementDuplicateDeletes | ( | int32_t | increment = 1 | ) |
Increment the count of duplicate files deleted by a specific amount.
| increment | Amount to increment by. Defaults to 1. |
| void iceberg::SnapshotSummaryBuilder::Merge | ( | const SnapshotSummaryBuilder & | other | ) |
Merge another builder's metrics into this one.
| other | The builder to merge from |
| void iceberg::SnapshotSummaryBuilder::Set | ( | const std::string & | property, |
| const std::string & | value | ||
| ) |
Set a custom summary property.
| property | Property name |
| value | Property value |
| void iceberg::SnapshotSummaryBuilder::SetPartitionSummaryLimit | ( | int32_t | max | ) |
Set the maximum number of changed partitions before partition summaries will be excluded.
If the number of changed partitions is over this max, summaries will not be included. If the number of changed partitions is <= this limit, then partition-level summaries will be included in the summary if they are available, and "partition-summaries-included" will be set to "true".
| max | Maximum number of changed partitions |