Interface Committer

All Known Subinterfaces:
CatalogCommitter
All Known Implementing Classes:
DefaultFileSystemManagedTableOnlyCommitter

@Experimental public interface Committer
Interface for committing changes to Delta tables, supporting both filesystem-managed and catalog-managed tables.
  • Method Details

    • commit

      CommitResponse commit(Engine engine, CloseableIterator<Row> finalizedActions, CommitMetadata commitMetadata) throws CommitFailedException
      Commits the given finalizedActions and commitMetadata to the table.

      Filesystem-managed tables: Implementations must write the finalizedActions into a new Delta JSON file at version CommitMetadata.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:

      1. Writing the finalized actions into a staged commit file
      2. Calling catalog commit APIs with the staged commit location (or inline content) and additional metadata (such as the commit Protocol and Metadata)
      3. Publishing ratified catalog commits into the Delta log
      Parameters:
      engine - the Engine instance used for committing changes
      finalizedActions - the iterator of finalized actions to be committed
      commitMetadata - the CommitMetadata associated 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