public class ChildPartitionsRecordAction
extends java.lang.Object
ReadChangeStreamPartitionDoFn
SDF. It is
responsible for processing ChildPartitionsRecord
s. The new child partitions will be
stored in the Connector's metadata tables in order to be scheduled for future querying by the
DetectNewPartitionsDoFn
SDF.Modifier and Type | Method and Description |
---|---|
java.util.Optional<DoFn.ProcessContinuation> |
run(PartitionMetadata partition,
ChildPartitionsRecord record,
RestrictionTracker<TimestampRange,com.google.cloud.Timestamp> tracker,
ManualWatermarkEstimator<Instant> watermarkEstimator)
This is the main processing function for a
ChildPartitionsRecord . |
public java.util.Optional<DoFn.ProcessContinuation> run(PartitionMetadata partition, ChildPartitionsRecord record, RestrictionTracker<TimestampRange,com.google.cloud.Timestamp> tracker, ManualWatermarkEstimator<Instant> watermarkEstimator)
ChildPartitionsRecord
. It returns an Optional
of DoFn.ProcessContinuation
to indicate if the calling function should stop or
not. If the Optional
returned is empty, it means that the calling function can continue
with the processing. If an Optional
of DoFn.ProcessContinuation.stop()
is returned,
it means that this function was unable to claim the timestamp of the ChildPartitionsRecord
, so the caller should stop.
When processing the ChildPartitionsRecord
the following procedure is applied:
partition
- the current partition being processedrecord
- the change stream child partition record receivedtracker
- the restriction tracker of the ReadChangeStreamPartitionDoFn
SDFwatermarkEstimator
- the watermark estimator of the ReadChangeStreamPartitionDoFn
SDFOptional.empty()
if the caller can continue processing more records. A non
empty Optional
with DoFn.ProcessContinuation.stop()
if this function was unable
to claim the ChildPartitionsRecord
timestamp