IN
- Type of the input elementsOUT
- Type fo the output elementspublic abstract class AbstractCEPBasePatternOperator<IN,OUT> extends AbstractStreamOperator<OUT> implements OneInputStreamOperator<IN,OUT>, StreamCheckpointedOperator
NFA
to detect complex event
patterns. The detected event patterns are then outputted to the down stream operators.AbstractStreamOperator.CountingOutput, AbstractStreamOperator.LatencyGauge
Modifier and Type | Field and Description |
---|---|
protected static int |
INITIAL_PRIORITY_QUEUE_CAPACITY |
chainingStrategy, config, latencyGauge, 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, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorName, getOperatorStateBackend, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getUserCodeClassloader, initializeState, initializeState, notifyOfCompletedCheckpoint, numEventTimeTimers, numProcessingTimeTimers, open, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark, processWatermark1, processWatermark2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setup, snapshotLegacyOperatorState, snapshotState, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processLatencyMarker, processWatermark
close, dispose, getChainingStrategy, getMetricGroup, initializeState, notifyOfCompletedCheckpoint, open, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setup, snapshotLegacyOperatorState, snapshotState
snapshotState
restoreState
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.