Package io.delta.kernel.unitycatalog
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
ConstructorsConstructorDescriptionUCCatalogManagedCommitter(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 TypeMethodDescriptionio.delta.kernel.commit.CommitResponsecommit(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.FileStatuskernelFileStatusToHadoopFileStatus(io.delta.kernel.utils.FileStatus kernelFileStatus) voidpublish(io.delta.kernel.engine.Engine engine, io.delta.kernel.commit.PublishMetadata publishMetadata)
-
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 operationsucTableId- the unique Unity Catalog table identifiertablePath- 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 providedUCTableIdentifierenables 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:
commitin interfaceio.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:
publishin interfaceio.delta.kernel.commit.CatalogCommitter- Throws:
io.delta.kernel.commit.PublishFailedException
-
getRequiredTableProperties
- Specified by:
getRequiredTablePropertiesin interfaceio.delta.kernel.commit.CatalogCommitter
-
kernelFileStatusToHadoopFileStatus
@VisibleForTesting public static org.apache.hadoop.fs.FileStatus kernelFileStatusToHadoopFileStatus(io.delta.kernel.utils.FileStatus kernelFileStatus)
-