public class DetectNewPartitionsAction
extends java.lang.Object
DetectNewPartitionsAction#run(RestrictionTracker, OutputReceiver, ManualWatermarkEstimator).| Constructor and Description |
|---|
DetectNewPartitionsAction(PartitionMetadataDao dao,
PartitionMetadataMapper mapper,
ChangeStreamMetrics metrics,
Duration resumeDuration)
Constructs an action class for detecting / scheduling new partitions.
|
| Modifier and Type | Method and Description |
|---|---|
DoFn.ProcessContinuation |
run(RestrictionTracker<TimestampRange,com.google.cloud.Timestamp> tracker,
DoFn.OutputReceiver<PartitionMetadata> receiver,
ManualWatermarkEstimator<Instant> watermarkEstimator)
Executes the main logic to schedule new partitions.
|
public DetectNewPartitionsAction(PartitionMetadataDao dao, PartitionMetadataMapper mapper, ChangeStreamMetrics metrics, Duration resumeDuration)
public DoFn.ProcessContinuation run(RestrictionTracker<TimestampRange,com.google.cloud.Timestamp> tracker, DoFn.OutputReceiver<PartitionMetadata> receiver, ManualWatermarkEstimator<Instant> watermarkEstimator)
PartitionMetadata.State.SCHEDULED.
tracker - an instance of DetectNewPartitionsRangeTrackerreceiver - a PartitionMetadata DoFn.OutputReceiverwatermarkEstimator - a ManualWatermarkEstimator of InstantDoFn.ProcessContinuation.stop() if there are no more partitions to process or
DoFn.ProcessContinuation.resume() to re-schedule the function after the configured
interval.