Class PartitionMetadataTableNames
java.lang.Object
org.apache.beam.sdk.io.gcp.spanner.changestreams.dao.PartitionMetadataTableNames
- All Implemented Interfaces:
Serializable
Configuration for a partition metadata table. It encapsulates the name of the metadata table and
indexes.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPartitionMetadataTableNames(String tableName, String watermarkIndexName, String createdAtIndexName) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic PartitionMetadataTableNamesfromExistingTable(String databaseId, String table) Encapsulates a selected table name.static PartitionMetadataTableNamesgenerateRandom(String databaseId) Generates a unique name for the partition metadata table and its indexes.inthashCode()toString()
-
Constructor Details
-
PartitionMetadataTableNames
-
-
Method Details
-
generateRandom
Generates a unique name for the partition metadata table and its indexes. The table name will be in the form of"Metadata_<databaseId>_<uuid>". The watermark index will be in the form of"WatermarkIdx_<databaseId>_<uuid>. The createdAt / start timestamp index will be in the form of"CreatedAtIdx_<databaseId>_<uuid>.- Parameters:
databaseId- The database id where the table will be created- Returns:
- the unique generated names of the partition metadata ddl
-
fromExistingTable
Encapsulates a selected table name. Index names are generated, but will only be used if the given table does not exist. The watermark index will be in the form of"WatermarkIdx_<databaseId>_<uuid>. The createdAt / start timestamp index will be in the form of"CreatedAtIdx_<databaseId>_<uuid>.- Parameters:
databaseId- The database id for the tabletable- The table name to be used- Returns:
- an instance with the table name and generated index names
-
getTableName
-
getWatermarkIndexName
-
getCreatedAtIndexName
-
equals
-
hashCode
public int hashCode() -
toString
-