Class PartitionMetadataAdminDao
java.lang.Object
org.apache.beam.sdk.io.gcp.spanner.changestreams.dao.PartitionMetadataAdminDao
Data access object for creating and dropping the partition metadata table.
The partition metadata table will be used to keep the state of a partition as the Connector is performing change stream queries.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Metadata table column name for the timestamp at which the partition row was first created.static final String
Metadata table column name for the timestamp to end the change stream query of the partition.static final String
Metadata table column name for the timestamp at which the partition was marked as finished by theReadChangeStreamPartitionDoFn
SDF.static final String
Metadata table column name for the change stream query heartbeat interval in millis.static final String
Metadata table column name for parent partition tokens.static final String
Metadata table column name for the partition token.static final String
Metadata table column name for the timestamp at which the partition was marked as running by theReadChangeStreamPartitionDoFn
SDF.static final String
Metadata table column name for the timestamp at which the partition was scheduled by theDetectNewPartitionsDoFn
SDF.static final String
Metadata table column name for the timestamp to start the change stream query of the partition.static final String
Metadata table column name for the state that the partition is currently in.static final String
Metadata table column name for the current watermark of the partition. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Creates the metadata table in the given instance, database configuration, with the constructor specified table name.void
deletePartitionMetadataTable
(List<String> indexes) Drops the metadata table.
-
Field Details
-
COLUMN_PARTITION_TOKEN
Metadata table column name for the partition token.- See Also:
-
COLUMN_PARENT_TOKENS
Metadata table column name for parent partition tokens.- See Also:
-
COLUMN_START_TIMESTAMP
Metadata table column name for the timestamp to start the change stream query of the partition.- See Also:
-
COLUMN_END_TIMESTAMP
Metadata table column name for the timestamp to end the change stream query of the partition.- See Also:
-
COLUMN_HEARTBEAT_MILLIS
Metadata table column name for the change stream query heartbeat interval in millis.- See Also:
-
COLUMN_STATE
Metadata table column name for the state that the partition is currently in. Possible states can be seen inPartitionMetadata.State
.- See Also:
-
COLUMN_WATERMARK
Metadata table column name for the current watermark of the partition.- See Also:
-
COLUMN_CREATED_AT
Metadata table column name for the timestamp at which the partition row was first created.- See Also:
-
COLUMN_SCHEDULED_AT
Metadata table column name for the timestamp at which the partition was scheduled by theDetectNewPartitionsDoFn
SDF.- See Also:
-
COLUMN_RUNNING_AT
Metadata table column name for the timestamp at which the partition was marked as running by theReadChangeStreamPartitionDoFn
SDF.- See Also:
-
COLUMN_FINISHED_AT
Metadata table column name for the timestamp at which the partition was marked as finished by theReadChangeStreamPartitionDoFn
SDF.- See Also:
-
-
Method Details
-
createPartitionMetadataTable
public void createPartitionMetadataTable()Creates the metadata table in the given instance, database configuration, with the constructor specified table name. The operation is intended to complete inTIMEOUT_MINUTES
minutes and specifies a TTL of partition rows after they are marked as FINISHED asTTL_AFTER_PARTITION_FINISHED_DAYS
days. -
deletePartitionMetadataTable
Drops the metadata table. This operation should complete inTIMEOUT_MINUTES
minutes.
-