Package org.apache.iceberg
Class BaseTransaction
java.lang.Object
org.apache.iceberg.BaseTransaction
- All Implemented Interfaces:
Transaction
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
class
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Apply the pending changes from all actions and commit.Create a newexpire API
to expire snapshots in this table.Create a newmanage snapshot API
to manage snapshots in this table.Create a newappend API
to add files to this table.Create a newdelete API
to delete files in this table.Create a newappend API
to add files to this table.Create a newoverwrite API
to overwrite files by a filter expression.Not recommended: Create a newreplace partitions API
to dynamically overwrite partitions in the table with new data.Create a newrewrite API
to replace files in this table.Create a newrow-level delta API
to remove or replace rows in existing data files.Create a newReplaceSortOrder
to set a table sort order.Create a newrewrite manifests API
to replace manifests for this table.table()
Return theTable
that this transaction will update.Create a newUpdateLocation
to update table location.Create a newupdate partition statistics API
to add or remove partition statistics files in this table.Create a newUpdateProperties
to update table properties.Create a newUpdateSchema
to alter the columns of this table.Create a newUpdatePartitionSpec
to alter the partition spec of this table.Create a newupdate table statistics API
to add or remove statistics files in this table.
-
Method Details
-
table
Description copied from interface:Transaction
Return theTable
that this transaction will update.- Specified by:
table
in interfaceTransaction
- Returns:
- this transaction's table
-
tableName
-
startMetadata
-
currentMetadata
-
underlyingOps
-
updateSchema
Description copied from interface:Transaction
Create a newUpdateSchema
to alter the columns of this table.- Specified by:
updateSchema
in interfaceTransaction
- Returns:
- a new
UpdateSchema
-
updateSpec
Description copied from interface:Transaction
Create a newUpdatePartitionSpec
to alter the partition spec of this table.- Specified by:
updateSpec
in interfaceTransaction
- Returns:
- a new
UpdatePartitionSpec
-
updateProperties
Description copied from interface:Transaction
Create a newUpdateProperties
to update table properties.- Specified by:
updateProperties
in interfaceTransaction
- Returns:
- a new
UpdateProperties
-
replaceSortOrder
Description copied from interface:Transaction
Create a newReplaceSortOrder
to set a table sort order.- Specified by:
replaceSortOrder
in interfaceTransaction
- Returns:
- a new
ReplaceSortOrder
-
updateLocation
Description copied from interface:Transaction
Create a newUpdateLocation
to update table location.- Specified by:
updateLocation
in interfaceTransaction
- Returns:
- a new
UpdateLocation
-
newAppend
Description copied from interface:Transaction
Create a newappend API
to add files to this table.- Specified by:
newAppend
in interfaceTransaction
- Returns:
- a new
AppendFiles
-
newFastAppend
Description copied from interface:Transaction
Create a newappend API
to add files to this table.Using this method signals to the underlying implementation that the append should not perform extra work in order to commit quickly. Fast appends are not recommended for normal writes because the fast commit may cause split planning to slow down over time.
Implementations may not support fast appends, in which case this will return the same appender as
Transaction.newAppend()
.- Specified by:
newFastAppend
in interfaceTransaction
- Returns:
- a new
AppendFiles
-
newRewrite
Description copied from interface:Transaction
Create a newrewrite API
to replace files in this table.- Specified by:
newRewrite
in interfaceTransaction
- Returns:
- a new
RewriteFiles
-
rewriteManifests
Description copied from interface:Transaction
Create a newrewrite manifests API
to replace manifests for this table.- Specified by:
rewriteManifests
in interfaceTransaction
- Returns:
- a new
RewriteManifests
-
newOverwrite
Description copied from interface:Transaction
Create a newoverwrite API
to overwrite files by a filter expression.- Specified by:
newOverwrite
in interfaceTransaction
- Returns:
- a new
OverwriteFiles
-
newRowDelta
Description copied from interface:Transaction
Create a newrow-level delta API
to remove or replace rows in existing data files.- Specified by:
newRowDelta
in interfaceTransaction
- Returns:
- a new
RowDelta
-
newReplacePartitions
Description copied from interface:Transaction
Not recommended: Create a newreplace partitions API
to dynamically overwrite partitions in the table with new data.This is provided to implement SQL compatible with Hive table operations but is not recommended. Instead, use the
overwrite API
to explicitly overwrite data.- Specified by:
newReplacePartitions
in interfaceTransaction
- Returns:
- a new
ReplacePartitions
-
newDelete
Description copied from interface:Transaction
Create a newdelete API
to delete files in this table.- Specified by:
newDelete
in interfaceTransaction
- Returns:
- a new
DeleteFiles
-
updateStatistics
Description copied from interface:Transaction
Create a newupdate table statistics API
to add or remove statistics files in this table.- Specified by:
updateStatistics
in interfaceTransaction
- Returns:
- a new
UpdateStatistics
-
updatePartitionStatistics
Description copied from interface:Transaction
Create a newupdate partition statistics API
to add or remove partition statistics files in this table.- Specified by:
updatePartitionStatistics
in interfaceTransaction
- Returns:
- a new
UpdatePartitionStatistics
-
expireSnapshots
Description copied from interface:Transaction
Create a newexpire API
to expire snapshots in this table.- Specified by:
expireSnapshots
in interfaceTransaction
- Returns:
- a new
ExpireSnapshots
-
manageSnapshots
Description copied from interface:Transaction
Create a newmanage snapshot API
to manage snapshots in this table.- Specified by:
manageSnapshots
in interfaceTransaction
- Returns:
- a new
ManageSnapshots
-
commitTransaction
public void commitTransaction()Description copied from interface:Transaction
Apply the pending changes from all actions and commit.- Specified by:
commitTransaction
in interfaceTransaction
-