Class UCCatalogManagedCommitter

Object
io.delta.kernel.unitycatalog.UCCatalogManagedCommitter
All Implemented Interfaces:
io.delta.kernel.commit.CatalogCommitter, io.delta.kernel.commit.Committer

public class UCCatalogManagedCommitter extends Object implements io.delta.kernel.commit.Committer, io.delta.kernel.commit.CatalogCommitter
An implementation of Committer that handles commits to Delta tables managed by Unity Catalog. That is, these Delta tables must have the catalogManaged table feature supported.
  • Constructor Summary

    Constructors
    Constructor
    Description
    UCCatalogManagedCommitter(io.delta.storage.commit.uccommitcoordinator.UCClient ucClient, String ucTableId, String tablePath)
    Creates a committer for an existing Unity Catalog-managed Delta table (version >= 1 writes).
    UCCatalogManagedCommitter(io.delta.storage.commit.uccommitcoordinator.UCClient ucClient, String ucTableId, String tablePath, UCTableIdentifier ucTableIdentifier)
    Creates a committer for a new Unity Catalog-managed Delta table (CREATE TABLE).
  • Method Summary

    Modifier and Type
    Method
    Description
    io.delta.kernel.commit.CommitResponse
    commit(io.delta.kernel.engine.Engine engine, io.delta.kernel.utils.CloseableIterator<io.delta.kernel.data.Row> finalizedActions, io.delta.kernel.commit.CommitMetadata commitMetadata)
     
     
    static org.apache.hadoop.fs.FileStatus
    kernelFileStatusToHadoopFileStatus(io.delta.kernel.utils.FileStatus kernelFileStatus)
     
    void
    publish(io.delta.kernel.engine.Engine engine, io.delta.kernel.commit.PublishMetadata publishMetadata)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UCCatalogManagedCommitter

      public UCCatalogManagedCommitter(io.delta.storage.commit.uccommitcoordinator.UCClient ucClient, String ucTableId, String tablePath)
      Creates a committer for an existing Unity Catalog-managed Delta table (version >= 1 writes).
      Parameters:
      ucClient - the Unity Catalog client to use for commit operations
      ucTableId - the unique Unity Catalog table identifier
      tablePath - the path to the Delta table in the underlying storage system
    • UCCatalogManagedCommitter

      public UCCatalogManagedCommitter(io.delta.storage.commit.uccommitcoordinator.UCClient ucClient, String ucTableId, String tablePath, UCTableIdentifier ucTableIdentifier)
      Creates a committer for a new Unity Catalog-managed Delta table (CREATE TABLE). The provided UCTableIdentifier enables automatic table finalization in UC after writing the version-0 delta file.
  • Method Details

    • commit

      public io.delta.kernel.commit.CommitResponse commit(io.delta.kernel.engine.Engine engine, io.delta.kernel.utils.CloseableIterator<io.delta.kernel.data.Row> finalizedActions, io.delta.kernel.commit.CommitMetadata commitMetadata) throws io.delta.kernel.commit.CommitFailedException
      Specified by:
      commit in interface io.delta.kernel.commit.Committer
      Throws:
      io.delta.kernel.commit.CommitFailedException
    • publish

      public void publish(io.delta.kernel.engine.Engine engine, io.delta.kernel.commit.PublishMetadata publishMetadata) throws io.delta.kernel.commit.PublishFailedException
      Specified by:
      publish in interface io.delta.kernel.commit.CatalogCommitter
      Throws:
      io.delta.kernel.commit.PublishFailedException
    • getRequiredTableProperties

      public Map<String,String> getRequiredTableProperties()
      Specified by:
      getRequiredTableProperties in interface io.delta.kernel.commit.CatalogCommitter
    • kernelFileStatusToHadoopFileStatus

      @VisibleForTesting public static org.apache.hadoop.fs.FileStatus kernelFileStatusToHadoopFileStatus(io.delta.kernel.utils.FileStatus kernelFileStatus)