public class TransactionBuilderImpl extends Object implements TransactionBuilder
| Constructor and Description |
|---|
TransactionBuilderImpl(TableImpl table,
String engineInfo,
Operation operation) |
| Modifier and Type | Method and Description |
|---|---|
Transaction |
build(Engine engine)
Build the transaction.
|
TransactionBuilder |
withPartitionColumns(Engine engine,
java.util.List<String> partitionColumns)
Set the list of partitions columns when create a new partitioned table.
|
TransactionBuilder |
withSchema(Engine engine,
StructType newSchema)
Set the schema of the table when creating a new table.
|
TransactionBuilder |
withTableProperties(Engine engine,
java.util.Map<String,String> properties)
Set the table properties for the table.
|
TransactionBuilder |
withTransactionId(Engine engine,
String applicationId,
long transactionVersion)
Set the transaction identifier for idempotent writes.
|
public TransactionBuilder withSchema(Engine engine, StructType newSchema)
TransactionBuilderwithSchema in interface TransactionBuilderengine - Engine instance to use.newSchema - The new schema of the table.TransactionBuilder instance.public TransactionBuilder withPartitionColumns(Engine engine, java.util.List<String> partitionColumns)
TransactionBuilderwithPartitionColumns in interface TransactionBuilderengine - Engine instance to use.partitionColumns - The partition columns of the table. These should be a subset of the
columns in the schema.TransactionBuilder instance.public TransactionBuilder withTransactionId(Engine engine, String applicationId, long transactionVersion)
TransactionBuilderwithTransactionId in interface TransactionBuilderengine - Engine instance to use.applicationId - The application ID that is writing to the table.transactionVersion - The version of the transaction. This should be monotonically
increasing with each write for the same application ID.TransactionBuilder instance.public TransactionBuilder withTableProperties(Engine engine, java.util.Map<String,String> properties)
TransactionBuilderwithTableProperties in interface TransactionBuilderengine - Engine instance to use.properties - The table properties to set. These are key-value pairs that can be used to
configure the table. And these properties are stored in the table metadata.TransactionBuilder instance.public Transaction build(Engine engine)
TransactionBuilderbuild in interface TransactionBuilderengine - Engine instance to use.