public class PartitionMetadataMapper
extends java.lang.Object
Struct to a PartitionMetadata.| Modifier and Type | Method and Description |
|---|---|
PartitionMetadata |
from(Struct row)
Transforms a
Struct representing a partition metadata row into a PartitionMetadata model. |
public PartitionMetadata from(Struct row)
Struct representing a partition metadata row into a PartitionMetadata model. The Struct is expected to have the following fields:
PartitionMetadataAdminDao.COLUMN_PARTITION_TOKEN: non-nullable String
representing the partition unique identifier.
PartitionMetadataAdminDao.COLUMN_PARENT_TOKENS: non-nullable List of
String representing the partition parents' unique identifiers.
PartitionMetadataAdminDao.COLUMN_START_TIMESTAMP: non-nullable Timestamp
representing the start time at which the partition started existing in Cloud Spanner.
PartitionMetadataAdminDao.COLUMN_END_TIMESTAMP: non-nullable Timestamp
representing the end time for querying this partition.
PartitionMetadataAdminDao.COLUMN_HEARTBEAT_MILLIS: non-nullable Long
representing the number of milliseconds after the stream is idle, which a heartbeat
record will be emitted.
PartitionMetadataAdminDao.COLUMN_STATE: non-nullable String representing
the PartitionMetadata.State in which the partition is in.
PartitionMetadataAdminDao.COLUMN_WATERMARK: non-nullable Timestamp
representing the time for which all records with a timestamp less than it have been
processed.
PartitionMetadataAdminDao.COLUMN_CREATED_AT: non-nullable Timestamp
representing the time at which this partition was first detected.
PartitionMetadataAdminDao.COLUMN_SCHEDULED_AT: nullable Timestamp
representing the time at which this partition was scheduled to be queried.
PartitionMetadataAdminDao.COLUMN_RUNNING_AT: nullable Timestamp
representing the time at which the connector started processing this partition.
PartitionMetadataAdminDao.COLUMN_FINISHED_AT: nullable Timestamp
representing the time at which the connector finished processing this partition.
row - the Struct row to be converted. It should contain all the fields as
specified above.PartitionMetadata with the mapped Struct field values.