Class OrderedEventProcessor<EventT,EventKeyT,ResultT,StateT extends MutableState<EventT,ResultT>>
- java.lang.Object
-
- org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<EventKeyT,org.apache.beam.sdk.values.KV<java.lang.Long,EventT>>>,OrderedEventProcessorResult<EventKeyT,ResultT,EventT>>
-
- org.apache.beam.sdk.extensions.ordered.OrderedEventProcessor<EventT,EventKeyT,ResultT,StateT>
-
- Type Parameters:
EventT- type of eventEventKeyT- type of event keyStateT- type of the state
- All Implemented Interfaces:
java.io.Serializable,org.apache.beam.sdk.transforms.display.HasDisplayData
public abstract class OrderedEventProcessor<EventT,EventKeyT,ResultT,StateT extends MutableState<EventT,ResultT>> extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<EventKeyT,org.apache.beam.sdk.values.KV<java.lang.Long,EventT>>>,OrderedEventProcessorResult<EventKeyT,ResultT,EventT>>
Transform for processing ordered events. Events are grouped by the key and within each key they are applied according to the provided sequence. Events which arrive out of sequence are buffered and processed after all the missing events for a given key have arrived.There are two sequencing modes - a sequence per key and a global sequence. See
OrderedProcessingHandlerfor details on how to configure this transform.Notice: the global sequence processing on the Dataflow Runner requires running under Runner V2. Refer to Dataflow documentation for details.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringGLOBAL_SEQUENCE_TRACKER
-
Constructor Summary
Constructors Constructor Description OrderedEventProcessor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <EventTypeT,EventKeyTypeT,ResultTypeT,StateTypeT extends MutableState<EventTypeT,ResultTypeT>>
OrderedEventProcessor<EventTypeT,EventKeyTypeT,ResultTypeT,StateTypeT>create(OrderedProcessingHandler<EventTypeT,EventKeyTypeT,StateTypeT,ResultTypeT> handler)Create the transform.OrderedEventProcessorResult<EventKeyT,ResultT,EventT>expand(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<EventKeyT,org.apache.beam.sdk.values.KV<java.lang.Long,EventT>>> input)-
Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
-
-
-
Field Detail
-
GLOBAL_SEQUENCE_TRACKER
public static final java.lang.String GLOBAL_SEQUENCE_TRACKER
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static <EventTypeT,EventKeyTypeT,ResultTypeT,StateTypeT extends MutableState<EventTypeT,ResultTypeT>> OrderedEventProcessor<EventTypeT,EventKeyTypeT,ResultTypeT,StateTypeT> create(OrderedProcessingHandler<EventTypeT,EventKeyTypeT,StateTypeT,ResultTypeT> handler)
Create the transform.- Type Parameters:
EventTypeT- type of eventEventKeyTypeT- type of event keyResultTypeT- type of the result objectStateTypeT- type of the state to store- Parameters:
handler- provides the configuration of this transform- Returns:
- the transform
-
-