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
     
    default void
    setCheckpoint(Long recordsProcessed)
    Some Receiver support mechanism of checkpoint (e.g.
    void
     
  • Method Details

    • setStartOffset

      void setStartOffset(Long 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.