@Internal public class SourceOperatorStreamTask<T> extends StreamTask<T,SourceOperator<T,?>>
StreamTask
for executing the SourceOperator
.configuration, headOperator, inputProcessor, LOG, mailboxProcessor, operatorChain, stateBackend, timerService, TRIGGER_THREAD_GROUP
Constructor and Description |
---|
SourceOperatorStreamTask(Environment env) |
Modifier and Type | Method and Description |
---|---|
protected void |
advanceToEndOfEventTime()
Emits the
MAX_WATERMARK so that all registered timers are fired. |
protected void |
afterInvoke() |
protected CompletableFuture<Void> |
getCompletionFuture() |
void |
init() |
Future<Boolean> |
triggerCheckpointAsync(CheckpointMetaData checkpointMetaData,
CheckpointOptions checkpointOptions)
This method is called to trigger a checkpoint, asynchronously by the checkpoint coordinator.
|
abortCheckpointOnBarrier, beforeInvoke, cancel, cancelTask, cleanup, cleanUpInvoke, createRecordWriterDelegate, createStreamTaskStateInitializer, declineCheckpoint, dispatchOperatorEvent, executeInTaskThread, finalize, finishTask, getAsyncCheckpointStartDelayNanos, getAsyncOperationsThreadPool, getCancelables, getCheckpointStorage, getConfiguration, getMailboxExecutorFactory, getName, getProcessingTimeServiceFactory, getStreamStatusMaintainer, handleAsyncException, invoke, isCanceled, isFailing, isMailboxLoopRunning, isRunning, notifyCheckpointAbortAsync, notifyCheckpointCompleteAsync, processInput, runMailboxStep, setupNumRecordsInCounter, toString, triggerCheckpointOnBarrier
getCurrentNumberOfSubtasks, getEnvironment, getExecutionConfig, getIndexInSubtaskGroup, getJobConfiguration, getTaskConfiguration, getUserCodeClassLoader, setShouldInterruptOnCancel, shouldInterruptOnCancel
public SourceOperatorStreamTask(Environment env) throws Exception
Exception
protected CompletableFuture<Void> getCompletionFuture()
getCompletionFuture
in class StreamTask<T,SourceOperator<T,?>>
public void init() throws Exception
init
in class StreamTask<T,SourceOperator<T,?>>
Exception
public Future<Boolean> triggerCheckpointAsync(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions)
AbstractInvokable
This method is called for tasks that start the checkpoints by injecting the initial
barriers, i.e., the source tasks. In contrast, checkpoints on downstream operators, which are
the result of receiving checkpoint barriers, invoke the AbstractInvokable.triggerCheckpointOnBarrier(CheckpointMetaData, CheckpointOptions, CheckpointMetrics)
method.
triggerCheckpointAsync
in class StreamTask<T,SourceOperator<T,?>>
checkpointMetaData
- Meta data for about this checkpointcheckpointOptions
- Options for performing this checkpointfalse
if the checkpoint was not carried out, true
otherwiseprotected void advanceToEndOfEventTime()
StreamTask
MAX_WATERMARK
so that all registered timers are fired.
This is used by the source task when the job is TERMINATED
. In the case, we want
all the timers registered throughout the pipeline to fire and the related state (e.g.
windows) to be flushed.
For tasks other than the source task, this method does nothing.
advanceToEndOfEventTime
in class StreamTask<T,SourceOperator<T,?>>
protected void afterInvoke() throws Exception
afterInvoke
in class StreamTask<T,SourceOperator<T,?>>
Exception
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.