pub trait SnapshotCommit: Send + Sync {
// Required method
fn commit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
snapshot: &'life1 Snapshot,
statistics: &'life2 [PartitionStatistics],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Interface to commit a snapshot atomically.
Two implementations:
RenamingSnapshotCommit— file system atomic renameRESTSnapshotCommit— via Catalog API (e.g. REST)
Required Methods§
Sourcefn commit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
snapshot: &'life1 Snapshot,
statistics: &'life2 [PartitionStatistics],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn commit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
snapshot: &'life1 Snapshot,
statistics: &'life2 [PartitionStatistics],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Commit the given snapshot. Returns true if successful, false if another writer won the race.