IN
- Type of the input elementspublic class CEPPatternOperator<IN> extends AbstractCEPPatternOperator<IN>
NFA
and a priority queue to order out of order
elements in case of event time processing.INITIAL_PRIORITY_QUEUE_CAPACITY
chainingStrategy, LOG, output
Constructor and Description |
---|
CEPPatternOperator(TypeSerializer<IN> inputSerializer,
boolean isProcessingTime,
NFACompiler.NFAFactory<IN> nfaFactory) |
Modifier and Type | Method and Description |
---|---|
protected NFA<IN> |
getNFA() |
protected PriorityQueue<StreamRecord<IN>> |
getPriorityQueue() |
void |
open()
This method is called immediately before any elements are processed, it should contain the
operator's initialization logic.
|
void |
processWatermark(Watermark mark)
Processes a
Watermark . |
void |
restoreState(StreamTaskState state,
long recoveryTimestamp)
Restores the operator state, if this operator's execution is recovering from a checkpoint.
|
StreamTaskState |
snapshotOperatorState(long checkpointId,
long timestamp)
Called to draw a state snapshot from the operator.
|
getInputSerializer, processElement, processEvent
close, disableInputCopy, dispose, getChainingStrategy, getContainingTask, getExecutionConfig, getOperatorConfig, getPartitionedState, getPartitionedState, getRuntimeContext, getStateBackend, getUserCodeClassloader, isInputCopyingDisabled, notifyOfCompletedCheckpoint, registerTimer, setChainingStrategy, setKeyContext, setKeyContextElement1, setKeyContextElement2, setup
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, dispose, getChainingStrategy, isInputCopyingDisabled, notifyOfCompletedCheckpoint, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setup
public CEPPatternOperator(TypeSerializer<IN> inputSerializer, boolean isProcessingTime, NFACompiler.NFAFactory<IN> nfaFactory)
public void open()
AbstractStreamOperator
The default implementation does nothing.
open
in interface StreamOperator<Map<String,IN>>
open
in class AbstractStreamOperator<Map<String,IN>>
protected NFA<IN> getNFA() throws IOException
getNFA
in class AbstractCEPPatternOperator<IN>
IOException
protected PriorityQueue<StreamRecord<IN>> getPriorityQueue() throws IOException
getPriorityQueue
in class AbstractCEPPatternOperator<IN>
IOException
public void processWatermark(Watermark mark) throws Exception
OneInputStreamOperator
Watermark
.
This method is guaranteed to not be called concurrently with other methods of the operator.public StreamTaskState snapshotOperatorState(long checkpointId, long timestamp) throws Exception
StreamOperator
snapshotOperatorState
in interface StreamOperator<Map<String,IN>>
snapshotOperatorState
in class AbstractStreamOperator<Map<String,IN>>
checkpointId
- The ID of the checkpoint.timestamp
- The timestamp of the checkpoint.Exception
- Forwards exceptions that occur while drawing snapshots from the operator
and the key/value state.public void restoreState(StreamTaskState state, long recoveryTimestamp) throws Exception
StreamOperator
This method is called after StreamOperator.setup(StreamTask, StreamConfig, Output)
and before StreamOperator.open()
.
restoreState
in interface StreamOperator<Map<String,IN>>
restoreState
in class AbstractStreamOperator<Map<String,IN>>
state
- The state of operator that was snapshotted as part of checkpoint
from which the execution is restored.recoveryTimestamp
- Global recovery timestampException
- Exceptions during state restore should be forwarded, so that the system can
properly react to failed state restore and fail the execution attempt.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.