OUT - Type of the output elementsSRC - Type of the source function of this stream source operator@Internal public class StreamSource<OUT,SRC extends SourceFunction<OUT>> extends AbstractUdfStreamOperator<OUT,SRC>
StreamOperator for streaming sources.AbstractStreamOperator.CountingOutput<OUT>userFunctionchainingStrategy, config, latencyStats, LOG, metrics, output, timeServiceManager| 构造器和说明 |
|---|
StreamSource(SRC sourceFunction) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
advanceToEndOfEventTime() |
void |
cancel() |
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). |
protected boolean |
isCanceledOrStopped()
Checks whether the source has been canceled or stopped.
|
protected void |
markCanceledOrStopped()
Marks this source as canceled or stopped.
|
void |
run(Object lockingObject,
StreamStatusMaintainer streamStatusMaintainer,
OperatorChain<?,?> operatorChain) |
void |
run(Object lockingObject,
StreamStatusMaintainer streamStatusMaintainer,
Output<StreamRecord<OUT>> collector,
OperatorChain<?,?> operatorChain) |
dispose, getUserFunction, getUserFunctionParameters, initializeState, notifyCheckpointComplete, open, setOutputType, setup, snapshotStategetChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getUserCodeClassloader, initializeState, numEventTimeTimers, numProcessingTimeTimers, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark, processWatermark1, processWatermark2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, snapshotStatepublic StreamSource(SRC sourceFunction)
public void run(Object lockingObject, StreamStatusMaintainer streamStatusMaintainer, OperatorChain<?,?> operatorChain) throws Exception
Exceptionpublic void run(Object lockingObject, StreamStatusMaintainer streamStatusMaintainer, Output<StreamRecord<OUT>> collector, OperatorChain<?,?> operatorChain) throws Exception
Exceptionpublic void advanceToEndOfEventTime()
public void close()
throws Exception
AbstractStreamOperatorOneInputStreamOperator.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 在接口中 StreamOperator<OUT>close 在类中 AbstractUdfStreamOperator<OUT,SRC extends SourceFunction<OUT>>Exception - An exception in this method causes the operator to fail.public void cancel()
protected void markCanceledOrStopped()
This indicates that any exit of the #run(Object, StreamStatusMaintainer, Output) method
cannot be interpreted as the result of a finite source.
protected boolean isCanceledOrStopped()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.