public class DetectNewPartitionsAction
extends java.lang.Object
DetectNewPartitionsAction#run(RestrictionTracker, OutputReceiver, ManualWatermarkEstimator).| Constructor and Description |
|---|
DetectNewPartitionsAction(PartitionMetadataDao dao,
PartitionMetadataMapper mapper,
ChangeStreamMetrics metrics,
org.joda.time.Duration resumeDuration)
Constructs an action class for detecting / scheduling new partitions.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.transforms.DoFn.ProcessContinuation |
run(org.apache.beam.sdk.transforms.splittabledofn.RestrictionTracker<TimestampRange,com.google.cloud.Timestamp> tracker,
org.apache.beam.sdk.transforms.DoFn.OutputReceiver<PartitionMetadata> receiver,
org.apache.beam.sdk.transforms.splittabledofn.ManualWatermarkEstimator<org.joda.time.Instant> watermarkEstimator)
Executes the main logic to schedule new partitions.
|
public DetectNewPartitionsAction(PartitionMetadataDao dao, PartitionMetadataMapper mapper, ChangeStreamMetrics metrics, org.joda.time.Duration resumeDuration)
public org.apache.beam.sdk.transforms.DoFn.ProcessContinuation run(org.apache.beam.sdk.transforms.splittabledofn.RestrictionTracker<TimestampRange,com.google.cloud.Timestamp> tracker, org.apache.beam.sdk.transforms.DoFn.OutputReceiver<PartitionMetadata> receiver, org.apache.beam.sdk.transforms.splittabledofn.ManualWatermarkEstimator<org.joda.time.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.