public interface Transaction
Modifier and Type | Method and Description |
---|---|
void |
commitTransaction()
Apply the pending changes from all actions and commit.
|
ExpireSnapshots |
expireSnapshots()
Create a new
expire API to manage snapshots in this table. |
default ManageSnapshots |
manageSnapshots()
Create a new
manage snapshot API to manage snapshots in this table. |
AppendFiles |
newAppend()
Create a new
append API to add files to this table. |
DeleteFiles |
newDelete()
Create a new
delete API to replace files in this table. |
default AppendFiles |
newFastAppend()
Create a new
append API to add files to this table. |
OverwriteFiles |
newOverwrite()
Create a new
overwrite API to overwrite files by a filter expression. |
ReplacePartitions |
newReplacePartitions()
Not recommended: Create a new
replace partitions API to dynamically
overwrite partitions in the table with new data. |
RewriteFiles |
newRewrite()
Create a new
rewrite API to replace files in this table. |
RowDelta |
newRowDelta()
Create a new
row-level delta API to remove or replace rows in existing data
files. |
ReplaceSortOrder |
replaceSortOrder()
Create a new
ReplaceSortOrder to set a table sort order and commit the change. |
RewriteManifests |
rewriteManifests()
Create a new
rewrite manifests API to replace manifests for this
table. |
Table |
table()
Return the
Table that this transaction will update. |
UpdateLocation |
updateLocation()
Create a new
UpdateLocation to update table location. |
UpdateProperties |
updateProperties()
Create a new
UpdateProperties to update table properties. |
UpdateSchema |
updateSchema()
Create a new
UpdateSchema to alter the columns of this table. |
UpdatePartitionSpec |
updateSpec()
Create a new
UpdatePartitionSpec to alter the partition spec of this table. |
default UpdateStatistics |
updateStatistics()
Create a new
update table statistics API to add or remove statistics
files in this table. |
Table table()
Table
that this transaction will update.UpdateSchema updateSchema()
UpdateSchema
to alter the columns of this table.UpdateSchema
UpdatePartitionSpec updateSpec()
UpdatePartitionSpec
to alter the partition spec of this table.UpdatePartitionSpec
UpdateProperties updateProperties()
UpdateProperties
to update table properties.UpdateProperties
ReplaceSortOrder replaceSortOrder()
ReplaceSortOrder
to set a table sort order and commit the change.ReplaceSortOrder
UpdateLocation updateLocation()
UpdateLocation
to update table location.UpdateLocation
AppendFiles newAppend()
append API
to add files to this table.AppendFiles
default AppendFiles newFastAppend()
append 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 newAppend()
.
AppendFiles
RewriteFiles newRewrite()
rewrite API
to replace files in this table.RewriteFiles
RewriteManifests rewriteManifests()
rewrite manifests API
to replace manifests for this
table.RewriteManifests
OverwriteFiles newOverwrite()
overwrite API
to overwrite files by a filter expression.OverwriteFiles
RowDelta newRowDelta()
row-level delta API
to remove or replace rows in existing data
files.RowDelta
ReplacePartitions newReplacePartitions()
replace 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.
ReplacePartitions
DeleteFiles newDelete()
delete API
to replace files in this table.DeleteFiles
default UpdateStatistics updateStatistics()
update table statistics API
to add or remove statistics
files in this table.UpdateStatistics
ExpireSnapshots expireSnapshots()
expire API
to manage snapshots in this table.ExpireSnapshots
default ManageSnapshots manageSnapshots()
manage snapshot API
to manage snapshots in this table.ManageSnapshots
void commitTransaction()
ValidationException
- If any update cannot be applied to the current table metadata.CommitFailedException
- If the updates cannot be committed due to conflicts.