public class BaseTransaction extends java.lang.Object implements Transaction
Modifier and Type | Class and Description |
---|---|
class |
BaseTransaction.TransactionTable |
class |
BaseTransaction.TransactionTableOperations |
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. |
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. |
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. |
TableMetadata |
startMetadata() |
Table |
table()
Return the
Table that this transaction will update. |
TableOperations |
underlyingOps() |
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. |
UpdateStatistics |
updateStatistics()
Create a new
update table statistics API to add or remove statistics
files in this table. |
public Table table()
Transaction
Table
that this transaction will update.table
in interface Transaction
public TableMetadata startMetadata()
public TableOperations underlyingOps()
public UpdateSchema updateSchema()
Transaction
UpdateSchema
to alter the columns of this table.updateSchema
in interface Transaction
UpdateSchema
public UpdatePartitionSpec updateSpec()
Transaction
UpdatePartitionSpec
to alter the partition spec of this table.updateSpec
in interface Transaction
UpdatePartitionSpec
public UpdateProperties updateProperties()
Transaction
UpdateProperties
to update table properties.updateProperties
in interface Transaction
UpdateProperties
public ReplaceSortOrder replaceSortOrder()
Transaction
ReplaceSortOrder
to set a table sort order and commit the change.replaceSortOrder
in interface Transaction
ReplaceSortOrder
public UpdateLocation updateLocation()
Transaction
UpdateLocation
to update table location.updateLocation
in interface Transaction
UpdateLocation
public AppendFiles newAppend()
Transaction
append API
to add files to this table.newAppend
in interface Transaction
AppendFiles
public AppendFiles newFastAppend()
Transaction
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 Transaction.newAppend()
.
newFastAppend
in interface Transaction
AppendFiles
public RewriteFiles newRewrite()
Transaction
rewrite API
to replace files in this table.newRewrite
in interface Transaction
RewriteFiles
public RewriteManifests rewriteManifests()
Transaction
rewrite manifests API
to replace manifests for this
table.rewriteManifests
in interface Transaction
RewriteManifests
public OverwriteFiles newOverwrite()
Transaction
overwrite API
to overwrite files by a filter expression.newOverwrite
in interface Transaction
OverwriteFiles
public RowDelta newRowDelta()
Transaction
row-level delta API
to remove or replace rows in existing data
files.newRowDelta
in interface Transaction
RowDelta
public ReplacePartitions newReplacePartitions()
Transaction
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.
newReplacePartitions
in interface Transaction
ReplacePartitions
public DeleteFiles newDelete()
Transaction
delete API
to replace files in this table.newDelete
in interface Transaction
DeleteFiles
public UpdateStatistics updateStatistics()
Transaction
update table statistics API
to add or remove statistics
files in this table.updateStatistics
in interface Transaction
UpdateStatistics
public ExpireSnapshots expireSnapshots()
Transaction
expire API
to manage snapshots in this table.expireSnapshots
in interface Transaction
ExpireSnapshots
public void commitTransaction()
Transaction
commitTransaction
in interface Transaction