@Internal public class MultipleInputStreamTask<OUT> extends StreamTask<OUT,MultipleInputStreamOperator<OUT>>
StreamTask
for executing a MultipleInputStreamOperator
and supporting the
MultipleInputStreamOperator
to select input for reading.checkpointStorage, configuration, inputProcessor, LOG, mailboxProcessor, mainOperator, operatorChain, stateBackend, systemTimerService, timerService, TRIGGER_THREAD_GROUP
Constructor and Description |
---|
MultipleInputStreamTask(Environment env) |
Modifier and Type | Method and Description |
---|---|
void |
abortCheckpointOnBarrier(long checkpointId,
CheckpointException cause)
Aborts a checkpoint as the result of receiving possibly some checkpoint barriers, but at
least one
CancelCheckpointMarker . |
protected void |
advanceToEndOfEventTime()
Emits the
MAX_WATERMARK so that all registered timers are fired. |
protected void |
createInputProcessor(List<IndexedInputGate>[] inputGates,
StreamConfig.InputConfig[] inputs,
WatermarkGauge[] inputWatermarkGauges,
java.util.function.Function<Integer,StreamPartitioner<?>> gatePartitioners) |
void |
init() |
Future<Boolean> |
triggerCheckpointAsync(CheckpointMetaData metadata,
CheckpointOptions options)
This method is called to trigger a checkpoint, asynchronously by the checkpoint coordinator.
|
void |
triggerCheckpointOnBarrier(CheckpointMetaData checkpointMetaData,
CheckpointOptions checkpointOptions,
CheckpointMetricsBuilder checkpointMetrics)
This method is called when a checkpoint is triggered as a result of receiving checkpoint
barriers on all input streams.
|
afterInvoke, cancel, cancelTask, cleanup, cleanUpInvoke, createRecordWriterDelegate, createStreamTaskStateInitializer, declineCheckpoint, dispatchOperatorEvent, finalize, finishTask, getAsyncCheckpointStartDelayNanos, getAsyncOperationsThreadPool, getCancelables, getCheckpointStorage, getCompletionFuture, getConfiguration, getMailboxExecutorFactory, getName, getProcessingTimeServiceFactory, getStreamStatusMaintainer, handleAsyncException, invoke, isCanceled, isFailing, isMailboxLoopRunning, isRunning, isUsingNonBlockingInput, notifyCheckpointAbortAsync, notifyCheckpointCompleteAsync, processInput, restore, runMailboxLoop, runMailboxStep, setupNumRecordsInCounter, toString
getCurrentNumberOfSubtasks, getEnvironment, getExecutionConfig, getIndexInSubtaskGroup, getJobConfiguration, getTaskConfiguration, getUserCodeClassLoader, setShouldInterruptOnCancel, shouldInterruptOnCancel
public MultipleInputStreamTask(Environment env) throws Exception
Exception
public void init() throws Exception
init
in class StreamTask<OUT,MultipleInputStreamOperator<OUT>>
Exception
protected void createInputProcessor(List<IndexedInputGate>[] inputGates, StreamConfig.InputConfig[] inputs, WatermarkGauge[] inputWatermarkGauges, java.util.function.Function<Integer,StreamPartitioner<?>> gatePartitioners)
public Future<Boolean> triggerCheckpointAsync(CheckpointMetaData metadata, CheckpointOptions options)
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, CheckpointMetricsBuilder)
method.
triggerCheckpointAsync
in class StreamTask<OUT,MultipleInputStreamOperator<OUT>>
metadata
- Meta data for about this checkpointoptions
- Options for performing this checkpointfalse
if the checkpoint was not carried out, true
otherwisepublic void triggerCheckpointOnBarrier(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, CheckpointMetricsBuilder checkpointMetrics) throws IOException
AbstractInvokable
triggerCheckpointOnBarrier
in class StreamTask<OUT,MultipleInputStreamOperator<OUT>>
checkpointMetaData
- Meta data for about this checkpointcheckpointOptions
- Options for performing this checkpointcheckpointMetrics
- Metrics about this checkpointIOException
public void abortCheckpointOnBarrier(long checkpointId, CheckpointException cause) throws IOException
AbstractInvokable
CancelCheckpointMarker
.
This requires implementing tasks to forward a CancelCheckpointMarker
to their outputs.
abortCheckpointOnBarrier
in class StreamTask<OUT,MultipleInputStreamOperator<OUT>>
checkpointId
- The ID of the checkpoint to be aborted.cause
- The reason why the checkpoint was aborted during alignmentIOException
protected void advanceToEndOfEventTime() throws Exception
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<OUT,MultipleInputStreamOperator<OUT>>
Exception
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.