@Internal public class DetectNewPartitionsAction extends java.lang.Object
DetectNewPartitionsDoFn
.Constructor and Description |
---|
DetectNewPartitionsAction(ChangeStreamMetrics metrics,
MetadataTableDao metadataTableDao,
Instant endTime,
GenerateInitialPartitionsAction generateInitialPartitionsAction,
ResumeFromPreviousPipelineAction resumeFromPreviousPipelineAction,
ProcessNewPartitionsAction processNewPartitionsAction) |
Modifier and Type | Method and Description |
---|---|
DoFn.ProcessContinuation |
run(RestrictionTracker<OffsetRange,java.lang.Long> tracker,
DoFn.OutputReceiver<PartitionRecord> receiver,
ManualWatermarkEstimator<Instant> watermarkEstimator,
InitialPipelineState initialPipelineState)
Perform the necessary steps to manage initial set of partitions and new partitions.
|
public DetectNewPartitionsAction(ChangeStreamMetrics metrics, MetadataTableDao metadataTableDao, @Nullable Instant endTime, GenerateInitialPartitionsAction generateInitialPartitionsAction, ResumeFromPreviousPipelineAction resumeFromPreviousPipelineAction, ProcessNewPartitionsAction processNewPartitionsAction)
public DoFn.ProcessContinuation run(RestrictionTracker<OffsetRange,java.lang.Long> tracker, DoFn.OutputReceiver<PartitionRecord> receiver, ManualWatermarkEstimator<Instant> watermarkEstimator, InitialPipelineState initialPipelineState) 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 pipelineDoFn.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