Class PartitionMetadataMapper
java.lang.Object
org.apache.beam.sdk.io.gcp.spanner.changestreams.mapper.PartitionMetadataMapper
This class is responsible for transforming a
Struct to a PartitionMetadata.-
Method Summary
Modifier and TypeMethodDescriptionTransforms aStructrepresenting a partition metadata row into aPartitionMetadatamodel.
-
Method Details
-
from
Transforms aStructrepresenting a partition metadata row into aPartitionMetadatamodel. TheStructis expected to have the following fields:PartitionMetadataAdminDao.COLUMN_PARTITION_TOKEN: non-nullableStringrepresenting the partition unique identifier.PartitionMetadataAdminDao.COLUMN_PARENT_TOKENS: non-nullableListofStringrepresenting the partition parents' unique identifiers.PartitionMetadataAdminDao.COLUMN_START_TIMESTAMP: non-nullableTimestamprepresenting the start time at which the partition started existing in Cloud Spanner.PartitionMetadataAdminDao.COLUMN_END_TIMESTAMP: non-nullableTimestamprepresenting the end time for querying this partition.PartitionMetadataAdminDao.COLUMN_HEARTBEAT_MILLIS: non-nullableLongrepresenting the number of milliseconds after the stream is idle, which a heartbeat record will be emitted.PartitionMetadataAdminDao.COLUMN_STATE: non-nullableStringrepresenting thePartitionMetadata.Statein which the partition is in.PartitionMetadataAdminDao.COLUMN_WATERMARK: non-nullableTimestamprepresenting the time for which all records with a timestamp less than it have been processed.PartitionMetadataAdminDao.COLUMN_CREATED_AT: non-nullableTimestamprepresenting the time at which this partition was first detected.PartitionMetadataAdminDao.COLUMN_SCHEDULED_AT: nullableTimestamprepresenting the time at which this partition was scheduled to be queried.PartitionMetadataAdminDao.COLUMN_RUNNING_AT: nullableTimestamprepresenting the time at which the connector started processing this partition.PartitionMetadataAdminDao.COLUMN_FINISHED_AT: nullableTimestamprepresenting the time at which the connector finished processing this partition.
- Parameters:
row- theStructrow to be converted. It should contain all the fields as specified above.- Returns:
- a
PartitionMetadatawith the mappedStructfield values.
-