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.
StreamOperator for streaming sources.- See Also:
-
Field Summary
Fields inherited from class org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator
userFunctionFields 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
ConstructorsConstructorDescriptionStreamSource(SRC sourceFunction) Deprecated.StreamSource(SRC sourceFunction, boolean emitProgressiveWatermarks) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()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.booleanDeprecated.protected booleanDeprecated.Checks whether the source has been canceled or stopped.protected voidDeprecated.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, snapshotStateMethods 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, isAsyncStateProcessingEnabled, 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, useSplittableTimersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.streaming.api.operators.KeyContextHandler
hasKeyContextMethods inherited from interface org.apache.flink.streaming.api.operators.StreamOperator
getOperatorAttributes
-
Constructor Details
-
StreamSource
Deprecated. -
StreamSource
Deprecated.
-
-
Method Details
-
emitsProgressiveWatermarks
@VisibleForTesting public boolean emitsProgressiveWatermarks()Deprecated. -
run
Deprecated.- Throws:
Exception
-
run
public void run(Object lockingObject, Output<StreamRecord<OUT>> collector, OperatorChain<?, ?> operatorChain) throws ExceptionDeprecated.- Throws:
Exception
-
close
Deprecated.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.
-
SourceFunctionAPI, which is due to be removed. Use the newSourceAPI instead.