@Internal public class SourceOperatorStreamTask<T> extends StreamTask<T,SourceOperator<T,?>>
StreamTask
for executing the SourceOperator
.Modifier and Type | Class and Description |
---|---|
static class |
SourceOperatorStreamTask.AsyncDataOutputToOutput<T>
Implementation of
PushingAsyncDataInput.DataOutput that wraps a specific Output . |
checkpointStorage, configuration, inputProcessor, LOG, mailboxProcessor, mainOperator, operatorChain, stateBackend, systemTimerService, 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 |
finishTask()
Instructs the task to go through its normal termination routine, i.e.
|
void |
init() |
CompletableFuture<Boolean> |
triggerCheckpointAsync(CheckpointMetaData checkpointMetaData,
CheckpointOptions checkpointOptions)
This method is called to trigger a checkpoint, asynchronously by the checkpoint coordinator.
|
abortCheckpointOnBarrier, afterInvoke, assertTriggeringCheckpointExceptions, cancel, cancelTask, cleanUp, cleanUpInternal, createRecordWriterDelegate, createStreamTaskStateInitializer, declineCheckpoint, dispatchOperatorEvent, endData, finalize, getAsyncCheckpointStartDelayNanos, getAsyncOperationsThreadPool, getCancelables, getCheckpointBarrierHandler, getCheckpointStorage, getCompletionFuture, getConfiguration, getEnvironment, getMailboxExecutorFactory, getName, getProcessingTimeServiceFactory, handleAsyncException, invoke, isCanceled, isFailing, isMailboxLoopRunning, isRunning, isUsingNonBlockingInput, maybeInterruptOnCancel, notifyCheckpointAbortAsync, notifyCheckpointCompleteAsync, processInput, restore, runMailboxLoop, runMailboxStep, setSynchronousSavepoint, setupNumRecordsInCounter, toString, triggerCheckpointOnBarrier
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getExecutionConfig, getIndexInSubtaskGroup, getJobConfiguration, getUserCodeClassLoader
public SourceOperatorStreamTask(Environment env) throws Exception
Exception
public void init() throws Exception
init
in class StreamTask<T,SourceOperator<T,?>>
Exception
protected void finishTask() throws Exception
StreamTask
StreamOperator.finish()
and StreamOperator.close()
on its operators.
This is used by the source task to get out of the run-loop when the job is stopped with a savepoint.
For tasks other than the source task, this method does nothing.
finishTask
in class StreamTask<T,SourceOperator<T,?>>
Exception
public CompletableFuture<Boolean> triggerCheckpointAsync(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions)
CheckpointableTask
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 CheckpointableTask.triggerCheckpointOnBarrier(CheckpointMetaData, CheckpointOptions, CheckpointMetricsBuilder)
method.
triggerCheckpointAsync
in interface CheckpointableTask
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,?>>
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.