@Internal public class ReadChangeStreamPartitionAction extends java.lang.Object
ReadChangeStreamPartitionDoFn SDF.| Constructor and Description |
|---|
ReadChangeStreamPartitionAction(MetadataTableDao metadataTableDao,
ChangeStreamDao changeStreamDao,
ChangeStreamMetrics metrics,
ChangeStreamAction changeStreamAction,
Duration heartbeatDuration) |
| Modifier and Type | Method and Description |
|---|---|
DoFn.ProcessContinuation |
run(PartitionRecord partitionRecord,
RestrictionTracker<StreamProgress,StreamProgress> tracker,
DoFn.OutputReceiver<KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation>> receiver,
ManualWatermarkEstimator<Instant> watermarkEstimator)
Streams changes from a specific partition.
|
public ReadChangeStreamPartitionAction(MetadataTableDao metadataTableDao, ChangeStreamDao changeStreamDao, ChangeStreamMetrics metrics, ChangeStreamAction changeStreamAction, Duration heartbeatDuration)
public DoFn.ProcessContinuation run(PartitionRecord partitionRecord, RestrictionTracker<StreamProgress,StreamProgress> tracker, DoFn.OutputReceiver<KV<com.google.protobuf.ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation>> receiver, ManualWatermarkEstimator<Instant> watermarkEstimator) throws java.io.IOException
ChangeStreamAction to process
individual response from the change stream.
Before we send a request to Cloud Bigtable to stream the partition, we need to perform a few things.
DetectNewPartitionsDoFn can read and output those new partitions to be streamed. We also
need to ensure we clean up this partition's metadata to release the lock.
partitionRecord - partition information used to identify this streamtracker - restriction tracker of ReadChangeStreamPartitionDoFnreceiver - output receiver for ReadChangeStreamPartitionDoFnwatermarkEstimator - watermark estimator ReadChangeStreamPartitionDoFnDoFn.ProcessContinuation.stop() if a checkpoint is required or the stream has
completed. Or DoFn.ProcessContinuation.resume() if a checkpoint is required.java.io.IOException - when stream fails.