Interface HasOffset


public interface HasOffset
Interface for any Spark Receiver that supports reading from and to some offset.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns exclusive end offset to which the reading from current page will occur.
    default void
    setCheckpoint(Long recordsProcessed)
    Some Receiver support mechanism of checkpoint (e.g.
    void
    Sets the start offset.
  • Method Details

    • setStartOffset

      void setStartOffset(Long offset)
      Sets the start offset.
      Parameters:
      offset - inclusive start offset from which the reading should be started.
    • getEndOffset

      Long getEndOffset()
      Returns exclusive end offset to which the reading from current page will occur.
    • setCheckpoint

      default void setCheckpoint(Long recordsProcessed)
      Some Receiver support mechanism of checkpoint (e.g. ack). This method should be called before stopping the receiver.