28#include <unordered_map>
115 const std::unordered_map<std::string, std::string>& snapshot_summary);
129 static std::unique_ptr<CommitMetrics>
Noop();
151 int64_t snapshot_id = kInvalidSnapshotId;
153 int64_t sequence_number = kInvalidSequenceNumber;
159 std::unordered_map<std::string, std::string>
metadata;
Live commit metrics collected during a table commit operation.
Definition commit_report.h:123
static std::unique_ptr< CommitMetrics > Noop()
Create a CommitMetrics instance with all-noop timer and counter.
static std::unique_ptr< CommitMetrics > Make(MetricsContext &context)
Create a CommitMetrics instance backed by the given MetricsContext.
std::shared_ptr< Counter > attempts
Counter for the number of commit attempts (including retries).
Definition commit_report.h:138
CommitMetricsResult ToResult() const
Snapshot current timer and counter values into a CommitMetricsResult.
std::shared_ptr< Timer > total_duration
Timer measuring total wall-clock time of the commit call.
Definition commit_report.h:135
Factory for creating named Counter and Timer instances.
Definition metrics_context.h:35
Define symbol visibility macros for core Iceberg APIs.
Factory interface for creating named Counter and Timer instances.
Serialisable snapshot types shared across scan and commit metrics.
Core Apache Iceberg C++ APIs.
Definition arrow_io_util.h:33
Immutable snapshot of commit metrics for use in CommitReport.
Definition commit_report.h:45
std::optional< CounterResult > added_equality_delete_files
Equality delete files added.
Definition commit_report.h:59
std::optional< CounterResult > added_positional_deletes
Positional delete records added.
Definition commit_report.h:87
std::optional< CounterResult > added_dvs
Deletion vectors added.
Definition commit_report.h:63
std::optional< CounterResult > total_delete_files
Total live delete files after this commit.
Definition commit_report.h:73
std::optional< CounterResult > removed_equality_deletes
Equality delete records removed.
Definition commit_report.h:95
std::optional< CounterResult > removed_files_size_bytes
Total byte size of files removed.
Definition commit_report.h:83
std::optional< CounterResult > added_delete_files
Number of delete files added in this commit.
Definition commit_report.h:57
static CommitMetricsResult From(const CommitMetrics &live_metrics, const std::unordered_map< std::string, std::string > &snapshot_summary)
Build a CommitMetricsResult from live metrics and a snapshot summary map.
std::optional< CounterResult > added_data_files
Number of data files added in this commit.
Definition commit_report.h:51
std::optional< CounterResult > processed_manifest_entries_count
Manifest entries processed in this commit.
Definition commit_report.h:105
std::optional< CounterResult > created_manifest_count
Manifest files created in this commit.
Definition commit_report.h:101
std::optional< CounterResult > removed_dvs
Deletion vectors removed.
Definition commit_report.h:69
std::optional< CounterResult > removed_equality_delete_files
Equality delete files removed.
Definition commit_report.h:71
std::optional< CounterResult > total_positional_deletes
Total positional delete records after this commit.
Definition commit_report.h:91
std::optional< CounterResult > replaced_manifest_count
Manifest files replaced in this commit.
Definition commit_report.h:103
std::optional< CounterResult > total_equality_deletes
Total equality delete records after this commit.
Definition commit_report.h:97
std::optional< CounterResult > total_files_size_bytes
Total byte size of all live files after this commit.
Definition commit_report.h:85
std::optional< CounterResult > added_files_size_bytes
Total byte size of files added.
Definition commit_report.h:81
std::optional< CounterResult > attempts
Number of commit attempts (1 on success without retries).
Definition commit_report.h:49
std::optional< CounterResult > total_records
Total live records after this commit.
Definition commit_report.h:79
std::optional< CounterResult > removed_positional_delete_files
Positional delete files removed.
Definition commit_report.h:67
std::optional< CounterResult > kept_manifest_count
Manifest files kept unchanged in this commit.
Definition commit_report.h:99
std::optional< CounterResult > added_records
Number of records added in this commit.
Definition commit_report.h:75
std::optional< CounterResult > added_positional_delete_files
Positional delete files added.
Definition commit_report.h:61
std::optional< CounterResult > added_equality_deletes
Equality delete records added.
Definition commit_report.h:93
std::optional< TimerResult > total_duration
Total wall-clock duration of the commit attempt.
Definition commit_report.h:47
std::optional< CounterResult > removed_delete_files
Number of delete files removed in this commit.
Definition commit_report.h:65
std::optional< CounterResult > removed_data_files
Number of data files removed in this commit.
Definition commit_report.h:53
std::optional< CounterResult > removed_positional_deletes
Positional delete records removed.
Definition commit_report.h:89
std::optional< CounterResult > total_data_files
Total live data files after this commit.
Definition commit_report.h:55
std::optional< CounterResult > removed_records
Number of records removed in this commit.
Definition commit_report.h:77
Report generated after a commit operation.
Definition commit_report.h:147
std::string operation
The operation that was performed (write, delete, etc.).
Definition commit_report.h:155
CommitMetricsResult commit_metrics
Metrics collected during the commit operation.
Definition commit_report.h:157
std::string table_name
The fully qualified name of the table that was modified.
Definition commit_report.h:149
std::unordered_map< std::string, std::string > metadata
Additional key-value metadata.
Definition commit_report.h:159