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> implements StreamOperator<OUT>
StreamOperator
for streaming sources.AbstractStreamOperator.CountingOutput, AbstractStreamOperator.LatencyGauge
userFunction
chainingStrategy, config, latencyGauge, LOG, metrics, output, timeServiceManager
Constructor and Description |
---|
StreamSource(SRC sourceFunction) |
Modifier and Type | Method and Description |
---|---|
void |
cancel() |
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) |
void |
run(Object lockingObject,
StreamStatusMaintainer streamStatusMaintainer,
Output<StreamRecord<OUT>> collector) |
close, dispose, getUserFunction, getUserFunctionParameters, initializeState, notifyOfCompletedCheckpoint, open, setOutputType, setup, snapshotState
getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getUserCodeClassloader, initializeState, numEventTimeTimers, numProcessingTimeTimers, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark, processWatermark1, processWatermark2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, dispose, getChainingStrategy, getMetricGroup, getOperatorID, initializeState, notifyOfCompletedCheckpoint, open, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setup, snapshotState
public StreamSource(SRC sourceFunction)
public void run(Object lockingObject, StreamStatusMaintainer streamStatusMaintainer) throws Exception
Exception
public void run(Object lockingObject, StreamStatusMaintainer streamStatusMaintainer, Output<StreamRecord<OUT>> collector) throws Exception
Exception
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–2018 The Apache Software Foundation. All rights reserved.