Class WatermarkEstimators.Manual

java.lang.Object
org.apache.beam.sdk.transforms.splittabledofn.WatermarkEstimators.Manual
All Implemented Interfaces:
ManualWatermarkEstimator<Instant>, WatermarkEstimator<Instant>
Enclosing class:
WatermarkEstimators

public static class WatermarkEstimators.Manual extends Object implements ManualWatermarkEstimator<Instant>
Concrete implementation of a ManualWatermarkEstimator.
  • Constructor Details

    • Manual

      public Manual(Instant watermark)
  • Method Details

    • setWatermark

      public void setWatermark(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 interface ManualWatermarkEstimator<Instant>
    • currentWatermark

      public 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 interface WatermarkEstimator<Instant>
    • getState

      public Instant getState()
      Description copied from interface: WatermarkEstimator
      Get current state of the WatermarkEstimator instance, which can be used to recreate the WatermarkEstimator when processing the restriction. See DoFn.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 interface WatermarkEstimator<Instant>