Package io.delta.kernel.commit
Interface Committer
- All Known Subinterfaces:
CatalogCommitter
- All Known Implementing Classes:
DefaultFileSystemManagedTableOnlyCommitter
Interface for committing changes to Delta tables, supporting both filesystem-managed and
catalog-managed tables.
-
Method Summary
Modifier and TypeMethodDescriptioncommit(Engine engine, CloseableIterator<Row> finalizedActions, CommitMetadata commitMetadata) Commits the givenfinalizedActionsandcommitMetadatato the table.
-
Method Details
-
commit
CommitResponse commit(Engine engine, CloseableIterator<Row> finalizedActions, CommitMetadata commitMetadata) throws CommitFailedException Commits the givenfinalizedActionsandcommitMetadatato the table.Filesystem-managed tables: Implementations must write the
finalizedActionsinto a new Delta JSON file at versionCommitMetadata.getVersion()using atomic file operations (PUT-if-absent semantics).Catalog-managed tables: Implementations must follow the commit rules and requirements as dictated by the managing catalog to ensure commit atomicity and consistency. This may involve:
- Writing the finalized actions into a staged commit file
- Calling catalog commit APIs with the staged commit location (or inline content) and additional metadata (such as the commit Protocol and Metadata)
- Publishing ratified catalog commits into the Delta log
- Parameters:
engine- theEngineinstance used for committing changesfinalizedActions- the iterator of finalized actions to be committedcommitMetadata- theCommitMetadataassociated with this commit, which contains additional metadata required to commit the finalized actions to the table, such as the commit version, Delta log path, and more.- Returns:
- CommitResponse containing the resultant commit
- Throws:
CommitFailedException- if the commit operation fails
-