IN
- type of results to be written into the sink.public class CollectSinkOperator<IN> extends StreamSink<IN> implements OperatorEventHandler
StreamSink
that collects query results and sends them back to the client.userFunction
chainingStrategy, config, latencyStats, LOG, metrics, output, processingTimeService
Constructor and Description |
---|
CollectSinkOperator(TypeSerializer<IN> serializer,
int maxResultsPerBatch,
String accumulatorName) |
Modifier and Type | Method and Description |
---|---|
void |
close()
This method is called after all records have been added to the operators via the methods
OneInputStreamOperator.processElement(StreamRecord) , or TwoInputStreamOperator.processElement1(StreamRecord) and TwoInputStreamOperator.processElement2(StreamRecord) . |
CompletableFuture<OperatorID> |
getOperatorIdFuture() |
void |
handleOperatorEvent(OperatorEvent evt) |
open, processElement, processWatermark, reportOrForwardLatencyMarker
dispose, getUserFunction, getUserFunctionParameters, initializeState, notifyCheckpointAborted, notifyCheckpointComplete, setOutputType, setup, snapshotState
getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getTimeServiceManager, getUserCodeClassloader, initializeState, isUsingCustomRawKeyedState, numEventTimeTimers, numProcessingTimeTimers, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processLatencyMarker
dispose, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointAborted, notifyCheckpointComplete
getCurrentKey, setCurrentKey
public CollectSinkOperator(TypeSerializer<IN> serializer, int maxResultsPerBatch, String accumulatorName)
public void handleOperatorEvent(OperatorEvent evt)
handleOperatorEvent
in interface OperatorEventHandler
public void close() throws Exception
AbstractStreamOperator
OneInputStreamOperator.processElement(StreamRecord)
, or TwoInputStreamOperator.processElement1(StreamRecord)
and TwoInputStreamOperator.processElement2(StreamRecord)
.
The method is expected to flush all remaining buffered data. Exceptions during this flushing of buffered should be propagated, in order to cause the operation to be recognized asa failed, because the last data items are not processed properly.
close
in interface StreamOperator<Object>
close
in class AbstractUdfStreamOperator<Object,SinkFunction<IN>>
Exception
- An exception in this method causes the operator to fail.public CompletableFuture<OperatorID> getOperatorIdFuture()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.