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. |
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. |
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. |
java.lang.String |
tableName() |
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()
TransactionTable that this transaction will update.table in interface Transactionpublic java.lang.String tableName()
public TableMetadata startMetadata()
public TableOperations underlyingOps()
public UpdateSchema updateSchema()
TransactionUpdateSchema to alter the columns of this table.updateSchema in interface TransactionUpdateSchemapublic UpdatePartitionSpec updateSpec()
TransactionUpdatePartitionSpec to alter the partition spec of this table.updateSpec in interface TransactionUpdatePartitionSpecpublic UpdateProperties updateProperties()
TransactionUpdateProperties to update table properties.updateProperties in interface TransactionUpdatePropertiespublic ReplaceSortOrder replaceSortOrder()
TransactionReplaceSortOrder to set a table sort order and commit the change.replaceSortOrder in interface TransactionReplaceSortOrderpublic UpdateLocation updateLocation()
TransactionUpdateLocation to update table location.updateLocation in interface TransactionUpdateLocationpublic AppendFiles newAppend()
Transactionappend API to add files to this table.newAppend in interface TransactionAppendFilespublic AppendFiles newFastAppend()
Transactionappend 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 TransactionAppendFilespublic RewriteFiles newRewrite()
Transactionrewrite API to replace files in this table.newRewrite in interface TransactionRewriteFilespublic RewriteManifests rewriteManifests()
Transactionrewrite manifests API to replace manifests for this
table.rewriteManifests in interface TransactionRewriteManifestspublic OverwriteFiles newOverwrite()
Transactionoverwrite API to overwrite files by a filter expression.newOverwrite in interface TransactionOverwriteFilespublic RowDelta newRowDelta()
Transactionrow-level delta API to remove or replace rows in existing data
files.newRowDelta in interface TransactionRowDeltapublic ReplacePartitions newReplacePartitions()
Transactionreplace 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 TransactionReplacePartitionspublic DeleteFiles newDelete()
Transactiondelete API to replace files in this table.newDelete in interface TransactionDeleteFilespublic UpdateStatistics updateStatistics()
Transactionupdate table statistics API to add or remove statistics
files in this table.updateStatistics in interface TransactionUpdateStatisticspublic ExpireSnapshots expireSnapshots()
Transactionexpire API to manage snapshots in this table.expireSnapshots in interface TransactionExpireSnapshotspublic ManageSnapshots manageSnapshots()
Transactionmanage snapshot API to manage snapshots in this table.manageSnapshots in interface TransactionManageSnapshotspublic void commitTransaction()
TransactioncommitTransaction in interface Transaction