Class PartitionMetadataAdminDao
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.spanner.changestreams.dao.PartitionMetadataAdminDao
-
public class PartitionMetadataAdminDao extends java.lang.ObjectData 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
Fields Modifier and Type Field Description static java.lang.StringCOLUMN_CREATED_ATMetadata table column name for the timestamp at which the partition row was first created.static java.lang.StringCOLUMN_END_TIMESTAMPMetadata table column name for the timestamp to end the change stream query of the partition.static java.lang.StringCOLUMN_FINISHED_ATMetadata table column name for the timestamp at which the partition was marked as finished by theReadChangeStreamPartitionDoFnSDF.static java.lang.StringCOLUMN_HEARTBEAT_MILLISMetadata table column name for the change stream query heartbeat interval in millis.static java.lang.StringCOLUMN_PARENT_TOKENSMetadata table column name for parent partition tokens.static java.lang.StringCOLUMN_PARTITION_TOKENMetadata table column name for the partition token.static java.lang.StringCOLUMN_RUNNING_ATMetadata table column name for the timestamp at which the partition was marked as running by theReadChangeStreamPartitionDoFnSDF.static java.lang.StringCOLUMN_SCHEDULED_ATMetadata table column name for the timestamp at which the partition was scheduled by theDetectNewPartitionsDoFnSDF.static java.lang.StringCOLUMN_START_TIMESTAMPMetadata table column name for the timestamp to start the change stream query of the partition.static java.lang.StringCOLUMN_STATEMetadata table column name for the state that the partition is currently in.static java.lang.StringCOLUMN_WATERMARKMetadata table column name for the current watermark of the partition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreatePartitionMetadataTable()Creates the metadata table in the given instance, database configuration, with the constructor specified table name.voiddeletePartitionMetadataTable()Drops the metadata table.
-
-
-
Field Detail
-
COLUMN_PARTITION_TOKEN
public static final java.lang.String COLUMN_PARTITION_TOKEN
Metadata table column name for the partition token.- See Also:
- Constant Field Values
-
COLUMN_PARENT_TOKENS
public static final java.lang.String COLUMN_PARENT_TOKENS
Metadata table column name for parent partition tokens.- See Also:
- Constant Field Values
-
COLUMN_START_TIMESTAMP
public static final java.lang.String COLUMN_START_TIMESTAMP
Metadata table column name for the timestamp to start the change stream query of the partition.- See Also:
- Constant Field Values
-
COLUMN_END_TIMESTAMP
public static final java.lang.String COLUMN_END_TIMESTAMP
Metadata table column name for the timestamp to end the change stream query of the partition.- See Also:
- Constant Field Values
-
COLUMN_HEARTBEAT_MILLIS
public static final java.lang.String COLUMN_HEARTBEAT_MILLIS
Metadata table column name for the change stream query heartbeat interval in millis.- See Also:
- Constant Field Values
-
COLUMN_STATE
public static final java.lang.String COLUMN_STATE
Metadata table column name for the state that the partition is currently in. Possible states can be seen inPartitionMetadata.State.- See Also:
- Constant Field Values
-
COLUMN_WATERMARK
public static final java.lang.String COLUMN_WATERMARK
Metadata table column name for the current watermark of the partition.- See Also:
- Constant Field Values
-
COLUMN_CREATED_AT
public static final java.lang.String COLUMN_CREATED_AT
Metadata table column name for the timestamp at which the partition row was first created.- See Also:
- Constant Field Values
-
COLUMN_SCHEDULED_AT
public static final java.lang.String COLUMN_SCHEDULED_AT
Metadata table column name for the timestamp at which the partition was scheduled by theDetectNewPartitionsDoFnSDF.- See Also:
- Constant Field Values
-
COLUMN_RUNNING_AT
public static final java.lang.String COLUMN_RUNNING_AT
Metadata table column name for the timestamp at which the partition was marked as running by theReadChangeStreamPartitionDoFnSDF.- See Also:
- Constant Field Values
-
COLUMN_FINISHED_AT
public static final java.lang.String COLUMN_FINISHED_AT
Metadata table column name for the timestamp at which the partition was marked as finished by theReadChangeStreamPartitionDoFnSDF.- See Also:
- Constant Field Values
-
-
Method Detail
-
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_MINUTESminutes and specifies a TTL of partition rows after they are marked as FINISHED asTTL_AFTER_PARTITION_FINISHED_DAYSdays.
-
deletePartitionMetadataTable
public void deletePartitionMetadataTable()
Drops the metadata table. This operation should complete inTIMEOUT_MINUTESminutes.
-
-