Class OrderedProcessingStatus
java.lang.Object
org.apache.beam.sdk.extensions.ordered.OrderedProcessingStatus
Indicates the status of ordered processing for a particular key.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OrderedProcessingStatus
create
(Long lastProcessedSequence, long numberOfBufferedEvents, Long earliestBufferedSequence, Long latestBufferedSequence, long numberOfReceivedEvents, long resultCount, long duplicateCount, boolean lastEventReceived, ContiguousSequenceRange lastContiguousRange) final boolean
abstract long
abstract Long
abstract ContiguousSequenceRange
abstract Long
abstract Long
abstract long
abstract long
abstract long
abstract Instant
final int
hashCode()
abstract boolean
-
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
- 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
- Returns:
- Earliest buffered sequence. If null is returned - there are no buffered events.
-
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
- Returns:
- Timestamp of when the status was produced. It is not related to the event's timestamp.
-
getLastContiguousSequenceRange
-
equals
-
hashCode
public final int hashCode()
-