Class OrderedProcessingStatus

java.lang.Object
org.apache.beam.sdk.extensions.ordered.OrderedProcessingStatus

@DefaultSchema(AutoValueSchema.class) public abstract class OrderedProcessingStatus extends Object
Indicates the status of ordered processing for a particular key.
  • Constructor Details

    • OrderedProcessingStatus

      public OrderedProcessingStatus()
  • Method Details

    • create

      public static OrderedProcessingStatus create(@Nullable Long lastProcessedSequence, long numberOfBufferedEvents, @Nullable Long earliestBufferedSequence, @Nullable Long latestBufferedSequence, long numberOfReceivedEvents, long resultCount, long duplicateCount, boolean lastEventReceived, @Nullable ContiguousSequenceRange lastContiguousRange)
    • getLastProcessedSequence

      @Nullable public abstract Long getLastProcessedSequence()
      Returns last sequence processed. If null is returned - no elements for the given key and window have been processed yet.
    • getNumberOfBufferedEvents

      public abstract long getNumberOfBufferedEvents()
      Returns number of events received out of sequence and buffered.
    • getEarliestBufferedSequence

      @Nullable public abstract Long getEarliestBufferedSequence()
      Returns earliest buffered sequence. If null is returned - there are no buffered events.
    • getLatestBufferedSequence

      @Nullable public abstract Long getLatestBufferedSequence()
      Returns latest buffered sequence. If null is returned - there are no buffered events.
    • getNumberOfReceivedEvents

      public abstract long getNumberOfReceivedEvents()
      Returns total number of events received for the given key and window.
    • getDuplicateCount

      public abstract long getDuplicateCount()
      Returns number of duplicate events which were output in OrderedEventProcessorResult.unprocessedEvents() PCollection.
    • getResultCount

      public abstract long getResultCount()
      Returns number of output results produced.
    • isLastEventReceived

      public abstract boolean isLastEventReceived()
      Returns indicator that the last event for the given key and window has been received. It doesn't necessarily mean that all the events for the given key and window have been processed. Use getNumberOfBufferedEvents() == 0 and this indicator as the sign that the processing is complete.
    • getStatusDate

      public abstract Instant getStatusDate()
      Returns timestamp of when the status was produced. It is not related to the event's timestamp.
    • getLastContiguousSequenceRange

      @Nullable public abstract ContiguousSequenceRange getLastContiguousSequenceRange()
    • equals

      public final boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object