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
,ReplaceViewVersion
,RewriteFiles
,RewriteManifests
,RowDelta
,SnapshotUpdate<ThisT>
,UpdateLocation
,UpdatePartitionSpec
,UpdatePartitionStatistics
,UpdateProperties
,UpdateSchema
,UpdateStatistics
,UpdateViewProperties
- All Known Implementing Classes:
BaseOverwriteFiles
,BaseReplacePartitions
,BaseReplaceSortOrder
,BaseRewriteManifests
,SetLocation
,SetPartitionStatistics
,SetStatistics
,SnapshotManager
,StreamingDelete
public interface PendingUpdate<T>
API for table metadata changes.
-
Method Details
-
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 metadataIllegalArgumentException
- 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
Generates update event to notify about metadata changes- Returns:
- the generated event
-