Interface AcceptsLatestSeenOffset

All Superinterfaces:

public interface AcceptsLatestSeenOffset extends SparkDataStream
Indicates that the source accepts the latest seen offset, which requires streaming execution to provide the latest seen offset when restarting the streaming query from checkpoint. Note that this interface aims to only support DSv2 streaming sources. Spark may throw error if the interface is implemented along with DSv1 streaming sources. The callback method will be called once per run.
  • Method Details

    • setLatestSeenOffset

      void setLatestSeenOffset(Offset offset)
      Callback method to receive the latest seen offset information from streaming execution. The method will be called only when the streaming query is restarted from checkpoint.
      offset - The offset which was latest seen in the previous run.