Class WatermarkEstimators.Manual
- java.lang.Object
-
- org.apache.beam.sdk.transforms.splittabledofn.WatermarkEstimators.Manual
-
- All Implemented Interfaces:
ManualWatermarkEstimator<org.joda.time.Instant>
,WatermarkEstimator<org.joda.time.Instant>
- Enclosing class:
- WatermarkEstimators
public static class WatermarkEstimators.Manual extends java.lang.Object implements ManualWatermarkEstimator<org.joda.time.Instant>
Concrete implementation of aManualWatermarkEstimator
.
-
-
Constructor Summary
Constructors Constructor Description Manual(org.joda.time.Instant watermark)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.joda.time.Instant
currentWatermark()
Return estimated output watermark.org.joda.time.Instant
getState()
Get current state of theWatermarkEstimator
instance, which can be used to recreate theWatermarkEstimator
when processing the restriction.void
setWatermark(org.joda.time.Instant watermark)
Sets a timestamp before or at the timestamps of all future elements produced by the associated DoFn.
-
-
-
Method Detail
-
setWatermark
public void setWatermark(org.joda.time.Instant watermark)
Description copied from interface:ManualWatermarkEstimator
Sets a timestamp before or at the timestamps of all future elements produced by the associated DoFn.This can be approximate. If records are output that violate this guarantee, they will be considered late, which will affect how they will be processed. See watermarks and late data for more information on late data and how to handle it.
However, this value should be as late as possible. Downstream windows may not be able to close until this watermark passes their end.
- Specified by:
setWatermark
in interfaceManualWatermarkEstimator<org.joda.time.Instant>
-
currentWatermark
public org.joda.time.Instant currentWatermark()
Description copied from interface:WatermarkEstimator
Return estimated output watermark. This method must return monotonically increasing watermarks across instances that are constructed from prior state.- Specified by:
currentWatermark
in interfaceWatermarkEstimator<org.joda.time.Instant>
-
getState
public org.joda.time.Instant getState()
Description copied from interface:WatermarkEstimator
Get current state of theWatermarkEstimator
instance, which can be used to recreate theWatermarkEstimator
when processing the restriction. SeeDoFn.NewWatermarkEstimator
for additional details.The internal state of the estimator must not be mutated by this method.
The state returned must not be mutated.
- Specified by:
getState
in interfaceWatermarkEstimator<org.joda.time.Instant>
-
-