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,org.apache.flink.api.common.state.CheckpointListener,KeyContext,KeyContextHandler,org.apache.flink.streaming.api.operators.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 theSourceFunctionAPI, which is due to be removed. Use the newSourceAPI instead.StreamOperatorfor 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
combinedWatermark, 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 voidcancel()Deprecated.voidclose()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.booleanemitsProgressiveWatermarks()Deprecated.protected booleanisCanceledOrStopped()Deprecated.Checks whether the source has been canceled or stopped.protected voidmarkCanceledOrStopped()Deprecated.Marks this source as canceled or stopped.voidrun(Object lockingObject, Output<StreamRecord<OUT>> collector, OperatorChain<?,?> operatorChain)Deprecated.voidrun(Object lockingObject, OperatorChain<?,?> operatorChain)Deprecated.voidstop()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
beforeInitializeStateHandler, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, isAsyncKeyOrderedProcessingEnabled, isUsingCustomRawKeyedState, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark, processWatermark, processWatermark1, processWatermark1, processWatermark2, processWatermark2, processWatermarkStatus, 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 ExceptionDeprecated.Description copied from interface:StreamOperatorThis 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:
closein interfaceStreamOperator<OUT>- Overrides:
closein 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.
-
-