public class QueryChangeStreamAction extends java.lang.Object
This class will also make sure to mirror the current watermark (event timestamp processed) in the Connector's metadata tables, by registering a bundle after commit action.
When the change stream query for the partition is finished, this class will update the state of the partition in the metadata tables as FINISHED, indicating completion.
|Modifier and Type||Method and Description|
This method will dispatch a change stream query for the given partition, it delegate the processing of the records to one of the corresponding action classes registered and it will keep the state of the partition up to date in the Connector's metadata table.
public DoFn.ProcessContinuation run(PartitionMetadata partition, RestrictionTracker<TimestampRange,com.google.cloud.Timestamp> tracker, DoFn.OutputReceiver<DataChangeRecord> receiver, ManualWatermarkEstimator<Instant> watermarkEstimator, DoFn.BundleFinalizer bundleFinalizer)
The algorithm is as follows:
DoFn.ProcessContinuation.stop()is returned from the actions, we stop processing and return.
partition- the current partition being processed
tracker- the restriction tracker of the
receiver- the output receiver of the
watermarkEstimator- the watermark estimator of the
bundleFinalizer- the bundle finalizer for
DoFn.ProcessContinuation.stop()if a record timestamp could not be claimed or if the partition processing has finished