Package org.apache.flink.cep.operator
Class CepOperator<IN,KEY,OUT>
- java.lang.Object
-
- org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
-
- org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<OUT,PatternProcessFunction<IN,OUT>>
-
- org.apache.flink.cep.operator.CepOperator<IN,KEY,OUT>
-
- Type Parameters:
IN- Type of the input elementsKEY- Type of the key on which the input stream is keyedOUT- Type of the output elements
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.state.CheckpointListener,org.apache.flink.streaming.api.operators.Input<IN>,org.apache.flink.streaming.api.operators.KeyContext,org.apache.flink.streaming.api.operators.KeyContextHandler,org.apache.flink.streaming.api.operators.OneInputStreamOperator<IN,OUT>,org.apache.flink.streaming.api.operators.OutputTypeConfigurable<OUT>,org.apache.flink.streaming.api.operators.StreamOperator<OUT>,org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator,org.apache.flink.streaming.api.operators.Triggerable<KEY,org.apache.flink.runtime.state.VoidNamespace>,org.apache.flink.streaming.api.operators.UserFunctionProvider<PatternProcessFunction<IN,OUT>>,org.apache.flink.streaming.api.operators.YieldingOperator<OUT>
@Internal public class CepOperator<IN,KEY,OUT> extends org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<OUT,PatternProcessFunction<IN,OUT>> implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<IN,OUT>, org.apache.flink.streaming.api.operators.Triggerable<KEY,org.apache.flink.runtime.state.VoidNamespace>
CEP pattern operator for a keyed input stream. For each key, the operator creates aNFAand a priority queue to buffer out of order elements. Both data structures are stored using the managed keyed state.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CepOperator(org.apache.flink.api.common.typeutils.TypeSerializer<IN> inputSerializer, boolean isProcessingTime, NFACompiler.NFAFactory<IN> nfaFactory, EventComparator<IN> comparator, AfterMatchSkipStrategy afterMatchSkipStrategy, PatternProcessFunction<IN,OUT> function, org.apache.flink.util.OutputTag<IN> lateDataOutputTag)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidinitializeState(org.apache.flink.runtime.state.StateInitializationContext context)voidonEventTime(org.apache.flink.streaming.api.operators.InternalTimer<KEY,org.apache.flink.runtime.state.VoidNamespace> timer)voidonProcessingTime(org.apache.flink.streaming.api.operators.InternalTimer<KEY,org.apache.flink.runtime.state.VoidNamespace> timer)voidopen()voidprocessElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element)protected voidsetup(org.apache.flink.streaming.runtime.tasks.StreamTask<?,?> containingTask, org.apache.flink.streaming.api.graph.StreamConfig config, org.apache.flink.streaming.api.operators.Output<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<OUT>> output)booleanuseSplittableTimers()-
Methods inherited from class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator
finish, getUserFunction, getUserFunctionParameters, notifyCheckpointAborted, notifyCheckpointComplete, setOutputType, snapshotState
-
Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator
beforeInitializeStateHandler, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, isAsyncStateProcessingEnabled, isUsingCustomRawKeyedState, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark, processWatermark, processWatermark1, processWatermark1, processWatermark2, processWatermark2, processWatermarkStatus, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, snapshotState
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.api.common.state.CheckpointListener
notifyCheckpointAborted, notifyCheckpointComplete
-
Methods inherited from interface org.apache.flink.streaming.api.operators.Input
processLatencyMarker, processRecordAttributes, processWatermark, processWatermark, processWatermarkStatus
-
Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContext
getCurrentKey, setCurrentKey
-
Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContextHandler
hasKeyContext
-
-
-
-
Constructor Detail
-
CepOperator
public CepOperator(org.apache.flink.api.common.typeutils.TypeSerializer<IN> inputSerializer, boolean isProcessingTime, NFACompiler.NFAFactory<IN> nfaFactory, @Nullable EventComparator<IN> comparator, @Nullable AfterMatchSkipStrategy afterMatchSkipStrategy, PatternProcessFunction<IN,OUT> function, @Nullable org.apache.flink.util.OutputTag<IN> lateDataOutputTag)
-
-
Method Detail
-
useSplittableTimers
public boolean useSplittableTimers()
- Overrides:
useSplittableTimersin classorg.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
-
setup
protected void setup(org.apache.flink.streaming.runtime.tasks.StreamTask<?,?> containingTask, org.apache.flink.streaming.api.graph.StreamConfig config, org.apache.flink.streaming.api.operators.Output<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<OUT>> output)- Overrides:
setupin classorg.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<OUT,PatternProcessFunction<IN,OUT>>
-
initializeState
public void initializeState(org.apache.flink.runtime.state.StateInitializationContext context) throws Exception- Specified by:
initializeStatein interfaceorg.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator- Overrides:
initializeStatein classorg.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<OUT,PatternProcessFunction<IN,OUT>>- Throws:
Exception
-
open
public void open() throws Exception
-
close
public void close() throws Exception
-
processElement
public void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element) throws Exception
-
onEventTime
public void onEventTime(org.apache.flink.streaming.api.operators.InternalTimer<KEY,org.apache.flink.runtime.state.VoidNamespace> timer) throws Exception
-
-