Class WatermarkEstimators.MonotonicallyIncreasing
java.lang.Object
org.apache.beam.sdk.transforms.splittabledofn.WatermarkEstimators.MonotonicallyIncreasing
- All Implemented Interfaces:
TimestampObservingWatermarkEstimator<Instant>,WatermarkEstimator<Instant>
- Enclosing class:
WatermarkEstimators
public static class WatermarkEstimators.MonotonicallyIncreasing
extends Object
implements TimestampObservingWatermarkEstimator<Instant>
A watermark estimator that observes timestamps of records output from a DoFn reporting the
timestamp of the last element seen as the current watermark.
Note that this watermark estimator expects output timestamps in monotonically increasing order. If they are not, then the watermark will advance based upon the last observed timestamp as long as it is greater then any previously reported watermark.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn estimated output watermark.getState()Get current state of theWatermarkEstimatorinstance, which can be used to recreate theWatermarkEstimatorwhen processing the restriction.voidobserveTimestamp(Instant timestamp) Update watermark estimate with latest output timestamp.
-
Constructor Details
-
MonotonicallyIncreasing
-
-
Method Details
-
observeTimestamp
Description copied from interface:TimestampObservingWatermarkEstimatorUpdate watermark estimate with latest output timestamp. This is called with the timestamp of every element output from the DoFn.- Specified by:
observeTimestampin interfaceTimestampObservingWatermarkEstimator<Instant>
-
currentWatermark
Description copied from interface:WatermarkEstimatorReturn estimated output watermark. This method must return monotonically increasing watermarks across instances that are constructed from prior state.- Specified by:
currentWatermarkin interfaceWatermarkEstimator<Instant>
-
getState
Description copied from interface:WatermarkEstimatorGet current state of theWatermarkEstimatorinstance, which can be used to recreate theWatermarkEstimatorwhen processing the restriction. SeeDoFn.NewWatermarkEstimatorfor additional details.The internal state of the estimator must not be mutated by this method.
The state returned must not be mutated.
- Specified by:
getStatein interfaceWatermarkEstimator<Instant>
-