Class StreamSource<OUT,SRC extends SourceFunction<OUT>>
- java.lang.Object
-
- org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
-
- org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator<OUT,SRC>
-
- org.apache.flink.streaming.api.operators.StreamSource<OUT,SRC>
-
- Type Parameters:
OUT
- Type of the output elementsSRC
- Type of the source function of this stream source operator
- All Implemented Interfaces:
Serializable
,CheckpointListener
,KeyContext
,KeyContextHandler
,OutputTypeConfigurable<OUT>
,StreamOperator<OUT>
,StreamOperatorStateHandler.CheckpointedStreamOperator
,UserFunctionProvider<SRC>
,YieldingOperator<OUT>
@Deprecated @Internal public class StreamSource<OUT,SRC extends SourceFunction<OUT>> extends AbstractUdfStreamOperator<OUT,SRC>
Deprecated.This class is based on theSourceFunction
API, which is due to be removed. Use the newSource
API instead.StreamOperator
for streaming sources.- 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
config, lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager
-
-
Constructor Summary
Constructors Constructor Description StreamSource(SRC sourceFunction)
Deprecated.StreamSource(SRC sourceFunction, boolean emitProgressiveWatermarks)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
cancel()
Deprecated.void
close()
Deprecated.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.boolean
emitsProgressiveWatermarks()
Deprecated.protected boolean
isCanceledOrStopped()
Deprecated.Checks whether the source has been canceled or stopped.protected void
markCanceledOrStopped()
Deprecated.Marks this source as canceled or stopped.void
run(Object lockingObject, Output<StreamRecord<OUT>> collector, OperatorChain<?,?> operatorChain)
Deprecated.void
run(Object lockingObject, OperatorChain<?,?> operatorChain)
Deprecated.void
stop()
Deprecated.-
Methods inherited from class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator
finish, getUserFunction, getUserFunctionParameters, initializeState, notifyCheckpointAborted, notifyCheckpointComplete, open, 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, isUsingCustomRawKeyedState, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, 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.streaming.api.operators.KeyContextHandler
hasKeyContext
-
Methods inherited from interface org.apache.flink.streaming.api.operators.StreamOperator
getOperatorAttributes
-
-
-
-
Method Detail
-
emitsProgressiveWatermarks
@VisibleForTesting public boolean emitsProgressiveWatermarks()
Deprecated.
-
run
public void run(Object lockingObject, OperatorChain<?,?> operatorChain) throws Exception
Deprecated.- Throws:
Exception
-
run
public void run(Object lockingObject, Output<StreamRecord<OUT>> collector, OperatorChain<?,?> operatorChain) throws Exception
Deprecated.- Throws:
Exception
-
close
public void close() throws Exception
Deprecated.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<OUT>
- Overrides:
close
in classAbstractUdfStreamOperator<OUT,SRC extends SourceFunction<OUT>>
- Throws:
Exception
-
stop
public void stop()
Deprecated.
-
cancel
public void cancel()
Deprecated.
-
markCanceledOrStopped
protected void markCanceledOrStopped()
Deprecated.Marks this source as canceled or stopped.This indicates that any exit of the
run(Object, Output, OperatorChain)
method cannot be interpreted as the result of a finite source.
-
isCanceledOrStopped
protected boolean isCanceledOrStopped()
Deprecated.Checks whether the source has been canceled or stopped.- Returns:
- True, if the source is canceled or stopped, false is not.
-
-