IN
- Type of the input elementsOUT
- Type fo the output elementspublic abstract class AbstractCEPBasePatternOperator<IN,OUT> extends AbstractStreamOperator<OUT> implements OneInputStreamOperator<IN,OUT>
NFA
to detect complex event
patterns. The detected event patterns are then outputted to the down stream operators.AbstractStreamOperator.CountingOutput
Modifier and Type | Field and Description |
---|---|
protected static int |
INITIAL_PRIORITY_QUEUE_CAPACITY |
chainingStrategy, LOG, metrics, output
Constructor and Description |
---|
AbstractCEPBasePatternOperator(TypeSerializer<IN> inputSerializer,
boolean isProcessingTime) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
advanceTime(NFA<IN> nfa,
long timestamp)
Advances the time for the given NFA to the given timestamp.
|
TypeSerializer<IN> |
getInputSerializer() |
protected abstract NFA<IN> |
getNFA() |
protected abstract PriorityQueue<StreamRecord<IN>> |
getPriorityQueue() |
void |
processElement(StreamRecord<IN> element)
Processes one element that arrived at this operator.
|
protected abstract void |
processEvent(NFA<IN> nfa,
IN event,
long timestamp)
Process the given event by giving it to the NFA and outputting the produced set of matched
event sequences.
|
protected abstract void |
updateNFA(NFA<IN> nfa) |
protected abstract void |
updatePriorityQueue(PriorityQueue<StreamRecord<IN>> queue) |
close, dispose, getChainingStrategy, getContainingTask, getCurrentProcessingTime, getExecutionConfig, getMetricGroup, getOperatorConfig, getOperatorName, getPartitionedState, getPartitionedState, getRuntimeContext, getStateBackend, getUserCodeClassloader, notifyOfCompletedCheckpoint, open, registerTimer, restoreState, setChainingStrategy, setKeyContext, setKeyContextElement1, setKeyContextElement2, setup, snapshotOperatorState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processWatermark
close, dispose, getChainingStrategy, getMetricGroup, notifyOfCompletedCheckpoint, open, restoreState, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setup, snapshotOperatorState
protected static final int INITIAL_PRIORITY_QUEUE_CAPACITY
public AbstractCEPBasePatternOperator(TypeSerializer<IN> inputSerializer, boolean isProcessingTime)
public TypeSerializer<IN> getInputSerializer()
protected abstract NFA<IN> getNFA() throws IOException
IOException
protected abstract void updateNFA(NFA<IN> nfa) throws IOException
IOException
protected abstract PriorityQueue<StreamRecord<IN>> getPriorityQueue() throws IOException
IOException
protected abstract void updatePriorityQueue(PriorityQueue<StreamRecord<IN>> queue) throws IOException
IOException
public void processElement(StreamRecord<IN> element) throws Exception
OneInputStreamOperator
processElement
in interface OneInputStreamOperator<IN,OUT>
Exception
protected abstract void processEvent(NFA<IN> nfa, IN event, long timestamp)
nfa
- NFA to be used for the event detectionevent
- The current event to be processedtimestamp
- The timestamp of the eventCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.