@InterfaceAudience.Public public interface ProcessorContext extends TaskContext
Modifier and Type | Method and Description |
---|---|
boolean |
canCommit()
Check whether this attempt can commit its output
|
static float |
preProcessProgress(float progress)
validate that progress is the valid range.
|
default void |
setProgress(float progress)
Set the overall progress of this Task Attempt.
|
void |
setProgressInternally(float progress)
The actual implementation of the taskAttempt progress.
|
void |
waitForAllInputsReady(Collection<Input> inputs)
Blocking call which returns only after all of the specified Inputs are
ready for consumption.
|
boolean |
waitForAllInputsReady(Collection<Input> inputs,
long timeoutMillis)
Blocking call which returns only after all of the specified Inputs are
ready for consumption with timeout.
|
Input |
waitForAnyInputReady(Collection<Input> inputs)
Blocking call which returns when any of the specified Inputs is ready for
consumption.
|
Input |
waitForAnyInputReady(Collection<Input> inputs,
long timeoutMillis)
Blocking call which returns when any of the specified Inputs is ready for
consumption.
|
fatalError, getApplicationId, getContainerConfiguration, getCounters, getDAGAttemptNumber, getDagIdentifier, getDAGName, getExecutionContext, getObjectRegistry, getServiceConsumerMetaData, getServiceProviderMetaData, getTaskAttemptNumber, getTaskIndex, getTaskVertexIndex, getTaskVertexName, getTotalMemoryAvailableToTask, getUniqueIdentifier, getUserPayload, getVertexParallelism, getWorkDirs, notifyProgress, reportFailure, requestInitialMemory, sendEvents
static float preProcessProgress(float progress)
progress
- default void setProgress(float progress)
TaskContext.notifyProgress()
and so invoking that separately is not required.progress
- Progress in the range from [0.0 - 1.0f]void setProgressInternally(float progress)
progress
- boolean canCommit() throws IOException
IOException
Input waitForAnyInputReady(Collection<Input> inputs) throws InterruptedException
inputs
- the list of Inputs to monitorInterruptedException
Input waitForAnyInputReady(Collection<Input> inputs, long timeoutMillis) throws InterruptedException
inputs
- the list of Inputs to monitortimeoutMillis
- timeout to return in milliseconds. If this value is negative,
this function will wait forever until all inputs get ready
or interrupted.InterruptedException
void waitForAllInputsReady(Collection<Input> inputs) throws InterruptedException
inputs
- the list of Inputs to monitorInterruptedException
boolean waitForAllInputsReady(Collection<Input> inputs, long timeoutMillis) throws InterruptedException
inputs
- the list of Inputs to monitortimeoutMillis
- timeout to return in milliseconds. If this value is negative,
this function will wait forever until all inputs get ready
or interrupted.InterruptedException
Copyright © 2024 Apache Software Foundation. All rights reserved.