Class CollectSinkOperator<IN>
- java.lang.Object
-
- org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
-
- org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<Object,SinkFunction<IN>>
-
- org.apache.flink.streaming.api.operators.StreamSink<IN>
-
- org.apache.flink.streaming.api.operators.collect.CollectSinkOperator<IN>
-
- Type Parameters:
IN
- type of results to be written into the sink.
- All Implemented Interfaces:
Serializable
,CheckpointListener
,OperatorEventHandler
,Input<IN>
,KeyContext
,KeyContextHandler
,OneInputStreamOperator<IN,Object>
,OutputTypeConfigurable<Object>
,StreamOperator<Object>
,StreamOperatorStateHandler.CheckpointedStreamOperator
,UserFunctionProvider<SinkFunction<IN>>
,YieldingOperator<Object>
public class CollectSinkOperator<IN> extends StreamSink<IN> implements OperatorEventHandler
AStreamSink
that collects query results and sends them back to the client.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator
userFunction
-
Fields inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator
combinedWatermark, config, lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager
-
-
Constructor Summary
Constructors Constructor Description CollectSinkOperator(TypeSerializer<IN> serializer, long maxBytesPerBatch, String accumulatorName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
This method is called at the very end of the operator's life, both in the case of a successful completion of the operation, and in the case of a failure and canceling.void
handleOperatorEvent(OperatorEvent evt)
-
Methods inherited from class org.apache.flink.streaming.api.operators.StreamSink
open, processElement, processWatermark, reportOrForwardLatencyMarker
-
Methods inherited from class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator
finish, getUserFunction, getUserFunctionParameters, initializeState, notifyCheckpointAborted, notifyCheckpointComplete, setOutputType, setup, snapshotState
-
Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator
getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, isAsyncStateProcessingEnabled, isUsingCustomRawKeyedState, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, snapshotState, useSplittableTimers
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.api.common.state.CheckpointListener
notifyCheckpointAborted, notifyCheckpointComplete
-
Methods inherited from interface org.apache.flink.streaming.api.operators.Input
processLatencyMarker, processRecordAttributes, processWatermarkStatus
-
Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContext
getCurrentKey, setCurrentKey
-
Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContextHandler
hasKeyContext
-
Methods inherited from interface org.apache.flink.streaming.api.operators.OneInputStreamOperator
setKeyContextElement
-
Methods inherited from interface org.apache.flink.streaming.api.operators.StreamOperator
finish, getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
-
-
-
-
Constructor Detail
-
CollectSinkOperator
public CollectSinkOperator(TypeSerializer<IN> serializer, long maxBytesPerBatch, String accumulatorName)
-
-
Method Detail
-
handleOperatorEvent
public void handleOperatorEvent(OperatorEvent evt)
- Specified by:
handleOperatorEvent
in interfaceOperatorEventHandler
-
close
public void close() throws Exception
Description copied from interface:StreamOperator
This method is called at the very end of the operator's life, both in the case of a successful completion of the operation, and in the case of a failure and canceling.This method is expected to make a thorough effort to release all resources that the operator has acquired.
NOTE:It can not emit any records! If you need to emit records at the end of processing, do so in the
StreamOperator.finish()
method.- Specified by:
close
in interfaceStreamOperator<IN>
- Overrides:
close
in classAbstractUdfStreamOperator<Object,SinkFunction<IN>>
- Throws:
Exception
-
-