OUT
- Type of the output elementsSRC
- Type of the source function of this stream source operatorSourceFunction
API, which is due to be
removed. Use the new Source
API instead.@Deprecated @Internal public class StreamSource<OUT,SRC extends SourceFunction<OUT>> extends AbstractUdfStreamOperator<OUT,SRC>
StreamOperator
for streaming sources.userFunction
chainingStrategy, config, lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager
Constructor and Description |
---|
StreamSource(SRC sourceFunction)
Deprecated.
|
StreamSource(SRC sourceFunction,
boolean emitProgressiveWatermarks)
Deprecated.
|
Modifier and Type | Method and 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,
OperatorChain<?,?> operatorChain)
Deprecated.
|
void |
run(Object lockingObject,
Output<StreamRecord<OUT>> collector,
OperatorChain<?,?> operatorChain)
Deprecated.
|
void |
stop()
Deprecated.
|
finish, getUserFunction, getUserFunctionParameters, initializeState, notifyCheckpointAborted, notifyCheckpointComplete, open, setOutputType, setup, snapshotState
getChainingStrategy, 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, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, snapshotState, useSplittableTimers
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOperatorAttributes
hasKeyContext
public StreamSource(SRC sourceFunction, boolean emitProgressiveWatermarks)
public StreamSource(SRC sourceFunction)
@VisibleForTesting public boolean emitsProgressiveWatermarks()
public void run(Object lockingObject, OperatorChain<?,?> operatorChain) throws Exception
Exception
public void run(Object lockingObject, Output<StreamRecord<OUT>> collector, OperatorChain<?,?> operatorChain) throws Exception
Exception
public void close() throws Exception
StreamOperator
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.
close
in interface StreamOperator<OUT>
close
in class AbstractUdfStreamOperator<OUT,SRC extends SourceFunction<OUT>>
Exception
public void stop()
public void cancel()
protected void markCanceledOrStopped()
This indicates that any exit of the run(Object, Output, OperatorChain)
method
cannot be interpreted as the result of a finite source.
protected boolean isCanceledOrStopped()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.