public static class PartitionMetadataDao.InTransactionContext
extends java.lang.Object
Constructor and Description |
---|
InTransactionContext(java.lang.String metadataTableName,
TransactionContext transaction)
Constructs a context to execute a user defined function transactionally.
|
Modifier and Type | Method and Description |
---|---|
Struct |
getPartition(java.lang.String partitionToken)
Fetches the partition metadata row data for the given partition token.
|
java.lang.Void |
insert(PartitionMetadata row)
Inserts the partition metadata.
|
java.lang.Void |
updateToFinished(java.lang.String partitionToken)
Updates a partition row to
PartitionMetadata.State.FINISHED state. |
java.lang.Void |
updateToRunning(java.lang.String partitionToken)
Updates a partition row to
PartitionMetadata.State.RUNNING state. |
java.lang.Void |
updateToScheduled(java.util.List<java.lang.String> partitionTokens)
Updates multiple partition rows to
PartitionMetadata.State.SCHEDULED state. |
java.lang.Void |
updateWatermark(java.lang.String partitionToken,
com.google.cloud.Timestamp watermark)
Update the partition watermark to the given timestamp.
|
public InTransactionContext(java.lang.String metadataTableName, TransactionContext transaction)
metadataTableName
- the name of the partition metadata tabletransaction
- the underlying client library transaction to be executedpublic java.lang.Void insert(PartitionMetadata row)
row
- the partition metadata to be insertedpublic java.lang.Void updateToScheduled(java.util.List<java.lang.String> partitionTokens)
PartitionMetadata.State.SCHEDULED
state.partitionTokens
- the partitions' unique identifierspublic java.lang.Void updateToRunning(java.lang.String partitionToken)
PartitionMetadata.State.RUNNING
state.partitionToken
- the partition unique identifierpublic java.lang.Void updateToFinished(java.lang.String partitionToken)
PartitionMetadata.State.FINISHED
state.partitionToken
- the partition unique identifierpublic java.lang.Void updateWatermark(java.lang.String partitionToken, com.google.cloud.Timestamp watermark)
partitionToken
- the partition unique identifierwatermark
- the new partition watermark@Nullable public Struct getPartition(java.lang.String partitionToken)
partitionToken
- the partition unique identifier