Package org.apache.iceberg
Interface PendingUpdate<T>
-
- Type Parameters:
T
- Java class of changes from this update; returned byapply()
for validation.
- All Known Subinterfaces:
AppendFiles
,DeleteFiles
,ExpireSnapshots
,ManageSnapshots
,OverwriteFiles
,ReplacePartitions
,ReplaceSortOrder
,RewriteFiles
,RewriteManifests
,Rollback
,RowDelta
,SnapshotUpdate<ThisT>
,UpdateLocation
,UpdatePartitionSpec
,UpdateProperties
,UpdateSchema
- All Known Implementing Classes:
BaseOverwriteFiles
,BaseReplacePartitions
,BaseReplaceSortOrder
,BaseRewriteManifests
,SetLocation
,SnapshotManager
public interface PendingUpdate<T>
API for table metadata changes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description T
apply()
Apply the pending changes and return the uncommitted changes for validation.void
commit()
Apply the pending changes and commit.default java.lang.Object
updateEvent()
Generates update event to notify about metadata changes
-
-
-
Method Detail
-
apply
T apply()
Apply the pending changes and return the uncommitted changes for validation.This does not result in a permanent update.
- Returns:
- the uncommitted changes that would be committed by calling
commit()
- Throws:
ValidationException
- If the pending changes cannot be applied to the current metadatajava.lang.IllegalArgumentException
- If the pending changes are conflicting or invalid
-
commit
void commit()
Apply the pending changes and commit.Changes are committed by calling the underlying table's commit method.
Once the commit is successful, the updated table will be refreshed.
- Throws:
ValidationException
- If the update cannot be applied to the current table metadata.CommitFailedException
- If the update cannot be committed due to conflicts.CommitStateUnknownException
- If the update success or failure is unknown, no cleanup should be done in this case.
-
updateEvent
default java.lang.Object updateEvent()
Generates update event to notify about metadata changes- Returns:
- the generated event
-
-