OUT
- Type of the output elements of this source.SRC
- Type of the source function for the stream source operatorOP
- Type of the stream source operator@Internal public class SourceStreamTask<OUT,SRC extends SourceFunction<OUT>,OP extends StreamSource<OUT,SRC>> extends StreamTask<OUT,OP>
StreamTask
for executing a StreamSource
.
One important aspect of this is that the checkpointing and the emission of elements must never
occur at the same time. The execution must be serial. This is achieved by having the contract
with the SourceFunction
that it must only modify its state or emit elements in
a synchronized block that locks on the lock Object. Also, the modification of the state
and the emission of elements must happen in the same block of code that is protected by the
synchronized block.
StreamTask.AsyncCheckpointRunnable
configuration, headOperator, operatorChain, stateBackend, timerService, TRIGGER_THREAD_GROUP
构造器和说明 |
---|
SourceStreamTask(org.apache.flink.runtime.execution.Environment env) |
限定符和类型 | 方法和说明 |
---|---|
protected void |
cancelTask() |
protected void |
cleanup() |
protected void |
init() |
protected void |
run() |
boolean |
triggerCheckpoint(org.apache.flink.runtime.checkpoint.CheckpointMetaData checkpointMetaData,
org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions) |
abortCheckpointOnBarrier, cancel, createCheckpointExceptionHandlerFactory, createRecordWriters, createStreamTaskStateInitializer, finalize, getAccumulatorMap, getAsyncOperationsThreadPool, getCancelables, getCheckpointLock, getCheckpointStorage, getConfiguration, getName, getProcessingTimeService, getStreamStatusMaintainer, handleAsyncException, invoke, isCanceled, isRunning, notifyCheckpointComplete, toString, triggerCheckpointOnBarrier
public SourceStreamTask(org.apache.flink.runtime.execution.Environment env)
protected void init()
init
在类中 StreamTask<OUT,OP extends StreamSource<OUT,SRC>>
protected void cleanup()
cleanup
在类中 StreamTask<OUT,OP extends StreamSource<OUT,SRC>>
protected void run() throws Exception
run
在类中 StreamTask<OUT,OP extends StreamSource<OUT,SRC>>
Exception
protected void cancelTask() throws Exception
cancelTask
在类中 StreamTask<OUT,OP extends StreamSource<OUT,SRC>>
Exception
public boolean triggerCheckpoint(org.apache.flink.runtime.checkpoint.CheckpointMetaData checkpointMetaData, org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions) throws Exception
triggerCheckpoint
在类中 StreamTask<OUT,OP extends StreamSource<OUT,SRC>>
Exception
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.