IN - Input Element TypeOUT - Output Element Typepublic abstract class AbstractSiddhiOperator<IN,OUT>
extends org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<IN,OUT>, org.apache.flink.streaming.api.operators.StreamCheckpointedOperator
ExecutionPlanRuntime according predefined execution plan and integrate with Flink Stream Operator lifecycle.
StreamRecord to Siddhi Event according to StreamSchema, and send to Siddhi Runtime.
TypeInformation, then output as typed DataStream.
| Constructor and Description |
|---|
AbstractSiddhiOperator(SiddhiOperatorContext siddhiPlan) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract org.apache.flink.streaming.runtime.streamrecord.MultiplexingStreamRecordSerializer<IN> |
createStreamRecordSerializer(StreamSchema streamSchema,
org.apache.flink.api.common.ExecutionConfig executionConfig) |
void |
dispose() |
PriorityQueue<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>> |
getPriorityQueue() |
org.wso2.siddhi.core.stream.input.InputHandler |
getSiddhiInputHandler(String streamId) |
protected SiddhiOperatorContext |
getSiddhiPlan() |
protected org.wso2.siddhi.core.ExecutionPlanRuntime |
getSiddhiRuntime() |
abstract String |
getStreamId(IN record) |
protected org.apache.flink.streaming.runtime.streamrecord.MultiplexingStreamRecordSerializer<IN> |
getStreamRecordSerializer(String streamId) |
void |
open() |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element) |
protected abstract void |
processEvent(String streamId,
StreamSchema<IN> schema,
IN value,
long timestamp) |
void |
processWatermark(org.apache.flink.streaming.api.watermark.Watermark mark) |
protected abstract PriorityQueue<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>> |
restoreQueuerState(org.apache.flink.core.memory.DataInputView dataInputView) |
void |
restoreState(org.apache.flink.core.fs.FSDataInputStream state) |
protected void |
send(String streamId,
Object[] data,
long timestamp)
Send input data to siddhi runtime
|
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) |
protected abstract void |
snapshotQueuerState(PriorityQueue<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>> queue,
org.apache.flink.core.memory.DataOutputView dataOutputView) |
void |
snapshotState(org.apache.flink.core.fs.FSDataOutputStream out,
long checkpointId,
long timestamp) |
RunnableFuture<org.apache.flink.runtime.state.OperatorStateHandle> |
snapshotState(long checkpointId,
long timestamp,
org.apache.flink.runtime.state.CheckpointStreamFactory streamFactory) |
close, getChainingStrategy, getContainingTask, getExecutionConfig, getKeyedStateBackend, getMetricGroup, getOperatorConfig, getOperatorStateBackend, getPartitionedState, getPartitionedState, getRuntimeContext, getTimerService, getUserCodeClassloader, notifyOfCompletedCheckpoint, restoreState, setChainingStrategy, setKeyContext, setKeyContextElement1, setKeyContextElement2public AbstractSiddhiOperator(SiddhiOperatorContext siddhiPlan)
siddhiPlan - Siddhi CEP Execution Planprotected abstract org.apache.flink.streaming.runtime.streamrecord.MultiplexingStreamRecordSerializer<IN> createStreamRecordSerializer(StreamSchema streamSchema, org.apache.flink.api.common.ExecutionConfig executionConfig)
protected org.apache.flink.streaming.runtime.streamrecord.MultiplexingStreamRecordSerializer<IN> getStreamRecordSerializer(String streamId)
public void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element) throws Exception
protected abstract void processEvent(String streamId, StreamSchema<IN> schema, IN value, long timestamp) throws Exception
Exceptionpublic void processWatermark(org.apache.flink.streaming.api.watermark.Watermark mark)
throws Exception
public PriorityQueue<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>> getPriorityQueue()
protected org.wso2.siddhi.core.ExecutionPlanRuntime getSiddhiRuntime()
public org.wso2.siddhi.core.stream.input.InputHandler getSiddhiInputHandler(String streamId)
protected SiddhiOperatorContext getSiddhiPlan()
public 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)
public void open()
throws Exception
protected void send(String streamId, Object[] data, long timestamp) throws InterruptedException
InterruptedExceptionpublic void dispose()
throws Exception
public void snapshotState(org.apache.flink.core.fs.FSDataOutputStream out,
long checkpointId,
long timestamp)
throws Exception
snapshotState in interface org.apache.flink.streaming.api.operators.StreamCheckpointedOperatorExceptionpublic RunnableFuture<org.apache.flink.runtime.state.OperatorStateHandle> snapshotState(long checkpointId, long timestamp, org.apache.flink.runtime.state.CheckpointStreamFactory streamFactory) throws Exception
public void restoreState(org.apache.flink.core.fs.FSDataInputStream state)
throws Exception
restoreState in interface org.apache.flink.streaming.api.operators.StreamCheckpointedOperatorExceptionprotected abstract void snapshotQueuerState(PriorityQueue<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>> queue, org.apache.flink.core.memory.DataOutputView dataOutputView) throws IOException
IOExceptionprotected abstract PriorityQueue<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>> restoreQueuerState(org.apache.flink.core.memory.DataInputView dataInputView) throws IOException
IOExceptionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.