@Internal public class MultipleInputStreamTask<OUT> extends StreamTask<OUT,MultipleInputStreamOperator<OUT>>
StreamTask
for executing a MultipleInputStreamOperator
and supporting the
MultipleInputStreamOperator
to select input for reading.StreamTask.CanEmitBatchOfRecordsChecker
checkpointStorage, configuration, inputProcessor, LOG, mailboxProcessor, mainOperator, operatorChain, recordWriter, 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,
Function<Integer,StreamPartitioner<?>> gatePartitioners) |
StreamTask.CanEmitBatchOfRecordsChecker |
getCanEmitBatchOfRecords() |
protected Optional<CheckpointBarrierHandler> |
getCheckpointBarrierHandler()
Acquires the optional
CheckpointBarrierHandler associated with this stream task. |
void |
init() |
CompletableFuture<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, cleanUpInternal, createRecordWriterDelegate, createStreamTaskStateInitializer, declineCheckpoint, dispatchOperatorEvent, endData, finalize, getAsyncCheckpointStartDelayNanos, getAsyncOperationsThreadPool, getCancelables, getCheckpointStorage, getCompletionFuture, getConfiguration, getEnvironment, getMailboxExecutorFactory, getName, getProcessingTimeServiceFactory, handleAsyncException, hasMail, invoke, isCanceled, isFailing, isMailboxLoopRunning, isRunning, isUsingNonBlockingInput, maybeInterruptOnCancel, notifyCheckpointAbortAsync, notifyCheckpointCompleteAsync, notifyCheckpointSubsumedAsync, notifyEndOfData, processInput, restore, runMailboxLoop, runMailboxStep, runSingleMailboxLoop, setSynchronousSavepoint, setupNumRecordsInCounter, toString
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getExecutionConfig, getIndexInSubtaskGroup, getJobConfiguration, getUserCodeClassLoader
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, Function<Integer,StreamPartitioner<?>> gatePartitioners)
protected Optional<CheckpointBarrierHandler> getCheckpointBarrierHandler()
StreamTask
CheckpointBarrierHandler
associated with this stream task. The
CheckpointBarrierHandler
should exist if the task has data inputs and requires to
align the barriers.getCheckpointBarrierHandler
in class StreamTask<OUT,MultipleInputStreamOperator<OUT>>
public CompletableFuture<Boolean> triggerCheckpointAsync(CheckpointMetaData metadata, CheckpointOptions options)
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<OUT,MultipleInputStreamOperator<OUT>>
metadata
- Meta data for about this checkpointoptions
- Options for performing this checkpointfalse
if the checkpoint was not carried out, true
otherwisepublic StreamTask.CanEmitBatchOfRecordsChecker getCanEmitBatchOfRecords()
getCanEmitBatchOfRecords
in class StreamTask<OUT,MultipleInputStreamOperator<OUT>>
public void triggerCheckpointOnBarrier(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, CheckpointMetricsBuilder checkpointMetrics) throws IOException
CheckpointableTask
triggerCheckpointOnBarrier
in interface CheckpointableTask
triggerCheckpointOnBarrier
in class StreamTask<OUT,MultipleInputStreamOperator<OUT>>
checkpointMetaData
- Meta data for about this checkpointcheckpointOptions
- Options for performing this checkpointcheckpointMetrics
- Metrics about this checkpointIOException
- Exceptions thrown as the result of triggering a checkpoint are forwarded.public void abortCheckpointOnBarrier(long checkpointId, CheckpointException cause) throws IOException
CheckpointableTask
CancelCheckpointMarker
.
This requires implementing tasks to forward a CancelCheckpointMarker
to their outputs.
abortCheckpointOnBarrier
in interface CheckpointableTask
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–2024 The Apache Software Foundation. All rights reserved.