IN
- Type of the input elementsKEY
- Type of the key on which the input stream is keyedOUT1
- Type of the output elementsOUT2
- Type of the timed out output elementspublic class FlatSelectTimeoutCepOperator<IN,OUT1,OUT2,KEY> extends AbstractKeyedCEPPatternOperator<IN,KEY,OUT1,FlatSelectTimeoutCepOperator.FlatSelectWrapper<IN,OUT1,OUT2>>
AbstractKeyedCEPPatternOperator
that applies given PatternFlatSelectFunction
to fully
matched event patterns and PatternFlatTimeoutFunction
to timed out ones. The timed out elements are returned
as a side-output.Modifier and Type | Class and Description |
---|---|
static class |
FlatSelectTimeoutCepOperator.FlatSelectWrapper<IN,OUT1,OUT2>
Wrapper that enables storing
PatternFlatSelectFunction and PatternFlatTimeoutFunction functions
in one udf. |
AbstractStreamOperator.CountingOutput
afterMatchSkipStrategy
userFunction
chainingStrategy, config, latencyStats, LOG, metrics, output, timeServiceManager
Constructor and Description |
---|
FlatSelectTimeoutCepOperator(TypeSerializer<IN> inputSerializer,
boolean isProcessingTime,
NFACompiler.NFAFactory<IN> nfaFactory,
EventComparator<IN> comparator,
AfterMatchSkipStrategy skipStrategy,
PatternFlatSelectFunction<IN,OUT1> flatSelectFunction,
PatternFlatTimeoutFunction<IN,OUT2> flatTimeoutFunction,
OutputTag<OUT2> outputTag) |
Modifier and Type | Method and Description |
---|---|
void |
open()
This method is called immediately before any elements are processed, it should contain the
operator's initialization logic, e.g.
|
protected void |
processMatchedSequences(Iterable<Map<String,List<IN>>> matchingSequences,
long timestamp) |
protected void |
processTimedOutSequences(Iterable<Tuple2<Map<String,List<IN>>,Long>> timedOutSequences,
long timestamp) |
getPQSize, hasNonEmptyNFA, hasNonEmptyPQ, initializeState, onEventTime, onProcessingTime, processElement
close, dispose, getUserFunction, getUserFunctionParameters, notifyCheckpointComplete, setOutputType, setup, snapshotState
getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getUserCodeClassloader, initializeState, numEventTimeTimers, numProcessingTimeTimers, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark, processWatermark1, processWatermark2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processLatencyMarker, processWatermark
close, dispose, getChainingStrategy, getMetricGroup, getOperatorID, initializeState, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setup, snapshotState
notifyCheckpointComplete
getCurrentKey, setCurrentKey
public FlatSelectTimeoutCepOperator(TypeSerializer<IN> inputSerializer, boolean isProcessingTime, NFACompiler.NFAFactory<IN> nfaFactory, EventComparator<IN> comparator, AfterMatchSkipStrategy skipStrategy, PatternFlatSelectFunction<IN,OUT1> flatSelectFunction, PatternFlatTimeoutFunction<IN,OUT2> flatTimeoutFunction, OutputTag<OUT2> outputTag)
public void open() throws Exception
AbstractStreamOperator
The default implementation does nothing.
open
in interface StreamOperator<OUT1>
open
in class AbstractKeyedCEPPatternOperator<IN,KEY,OUT1,FlatSelectTimeoutCepOperator.FlatSelectWrapper<IN,OUT1,OUT2>>
Exception
- An exception in this method causes the operator to fail.protected void processMatchedSequences(Iterable<Map<String,List<IN>>> matchingSequences, long timestamp) throws Exception
processMatchedSequences
in class AbstractKeyedCEPPatternOperator<IN,KEY,OUT1,FlatSelectTimeoutCepOperator.FlatSelectWrapper<IN,OUT1,OUT2>>
Exception
protected void processTimedOutSequences(Iterable<Tuple2<Map<String,List<IN>>,Long>> timedOutSequences, long timestamp) throws Exception
processTimedOutSequences
in class AbstractKeyedCEPPatternOperator<IN,KEY,OUT1,FlatSelectTimeoutCepOperator.FlatSelectWrapper<IN,OUT1,OUT2>>
Exception
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.