Class CepOperator<IN,​KEY,​OUT>

  • Type Parameters:
    IN - Type of the input elements
    KEY - Type of the key on which the input stream is keyed
    OUT - 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 a NFA and a priority queue to buffer out of order elements. Both data structures are stored using the managed keyed state.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator

        userFunction
      • Fields inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator

        combinedWatermark, config, lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void initializeState​(org.apache.flink.runtime.state.StateInitializationContext context)  
      void onEventTime​(org.apache.flink.streaming.api.operators.InternalTimer<KEY,​org.apache.flink.runtime.state.VoidNamespace> timer)  
      void onProcessingTime​(org.apache.flink.streaming.api.operators.InternalTimer<KEY,​org.apache.flink.runtime.state.VoidNamespace> timer)  
      void open()  
      void processElement​(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element)  
      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)  
      boolean useSplittableTimers()  
      • 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, isAsyncKeyOrderedProcessingEnabled, 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 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
      • Methods inherited from interface org.apache.flink.streaming.api.operators.OneInputStreamOperator

        setKeyContextElement
      • Methods inherited from interface org.apache.flink.streaming.api.operators.StreamOperator

        finish, getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
    • Method Detail

      • useSplittableTimers

        public boolean useSplittableTimers()
        Overrides:
        useSplittableTimers in class org.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:
        setup in class org.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:
        initializeState in interface org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator
        Overrides:
        initializeState in class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<OUT,​PatternProcessFunction<IN,​OUT>>
        Throws:
        Exception
      • open

        public void open()
                  throws Exception
        Specified by:
        open in interface org.apache.flink.streaming.api.operators.StreamOperator<IN>
        Overrides:
        open in class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<OUT,​PatternProcessFunction<IN,​OUT>>
        Throws:
        Exception
      • close

        public void close()
                   throws Exception
        Specified by:
        close in interface org.apache.flink.streaming.api.operators.StreamOperator<IN>
        Overrides:
        close in class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<OUT,​PatternProcessFunction<IN,​OUT>>
        Throws:
        Exception
      • processElement

        public void processElement​(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element)
                            throws Exception
        Specified by:
        processElement in interface org.apache.flink.streaming.api.operators.Input<IN>
        Throws:
        Exception
      • onEventTime

        public void onEventTime​(org.apache.flink.streaming.api.operators.InternalTimer<KEY,​org.apache.flink.runtime.state.VoidNamespace> timer)
                         throws Exception
        Specified by:
        onEventTime in interface org.apache.flink.streaming.api.operators.Triggerable<IN,​KEY>
        Throws:
        Exception
      • onProcessingTime

        public void onProcessingTime​(org.apache.flink.streaming.api.operators.InternalTimer<KEY,​org.apache.flink.runtime.state.VoidNamespace> timer)
                              throws Exception
        Specified by:
        onProcessingTime in interface org.apache.flink.streaming.api.operators.Triggerable<IN,​KEY>
        Throws:
        Exception