@Internal public class DetectNewPartitionsAction extends java.lang.Object
DetectNewPartitionsDoFn.| Constructor and Description |
|---|
DetectNewPartitionsAction(ChangeStreamMetrics metrics,
MetadataTableDao metadataTableDao,
GenerateInitialPartitionsAction generateInitialPartitionsAction) |
| Modifier and Type | Method and Description |
|---|---|
DoFn.ProcessContinuation |
run(RestrictionTracker<OffsetRange,java.lang.Long> tracker,
DoFn.OutputReceiver<PartitionRecord> receiver,
ManualWatermarkEstimator<Instant> watermarkEstimator,
DoFn.BundleFinalizer bundleFinalizer,
Instant startTime)
Perform the necessary steps to manage initial set of partitions and new partitions.
|
public DetectNewPartitionsAction(ChangeStreamMetrics metrics, MetadataTableDao metadataTableDao, GenerateInitialPartitionsAction generateInitialPartitionsAction)
public DoFn.ProcessContinuation run(RestrictionTracker<OffsetRange,java.lang.Long> tracker, DoFn.OutputReceiver<PartitionRecord> receiver, ManualWatermarkEstimator<Instant> watermarkEstimator, DoFn.BundleFinalizer bundleFinalizer, Instant startTime) throws java.lang.Exception
tracker - offset tracker that simply increment by 1 every single runreceiver - output new partitionswatermarkEstimator - update watermark that is a representation of the low watermark of the
entire beam pipelinebundleFinalizer - perform after bundle output actions to clean up metadata tableDoFn.ProcessContinuation.resume() with 1-second delay if the stream continues,
otherwise DoFn.ProcessContinuation.stop()com.google.protobuf.InvalidProtocolBufferException - if failing to process new partitionsjava.lang.Exception