public class TaskExecutionState extends Object implements Serializable
NOTE: The exception that may be attached to the state update is not necessarily a Flink or core Java exception, but may be an exception from the user code. As such, it cannot be deserialized without a special class loader. For that reason, the class keeps the actual exception field transient and deserialized it lazily, with the appropriate class loader.
Constructor and Description |
---|
TaskExecutionState(ExecutionAttemptID executionId,
ExecutionState executionState)
Creates a new task execution state update, with no attached exception and no accumulators.
|
TaskExecutionState(ExecutionAttemptID executionId,
ExecutionState executionState,
Throwable error)
Creates a new task execution state update, with an attached exception but no accumulators.
|
TaskExecutionState(ExecutionAttemptID executionId,
ExecutionState executionState,
Throwable error,
AccumulatorSnapshot accumulators,
IOMetrics ioMetrics)
Creates a new task execution state update, with an attached exception.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
AccumulatorSnapshot |
getAccumulators()
Gets flink and user-defined accumulators in serialized form.
|
Throwable |
getError(ClassLoader userCodeClassloader)
Gets the attached exception, which is in serialized form.
|
ExecutionState |
getExecutionState()
Returns the new execution state of the task.
|
ExecutionAttemptID |
getID()
Returns the ID of the task this result belongs to
|
IOMetrics |
getIOMetrics() |
int |
hashCode() |
String |
toString() |
public TaskExecutionState(ExecutionAttemptID executionId, ExecutionState executionState)
executionId
- the ID of the task execution whose state is to be reportedexecutionState
- the execution state to be reportedpublic TaskExecutionState(ExecutionAttemptID executionId, ExecutionState executionState, Throwable error)
executionId
- the ID of the task execution whose state is to be reportedexecutionState
- the execution state to be reportedpublic TaskExecutionState(ExecutionAttemptID executionId, ExecutionState executionState, Throwable error, AccumulatorSnapshot accumulators, IOMetrics ioMetrics)
executionId
- the ID of the task execution whose state is to be reportedexecutionState
- the execution state to be reportederror
- an optional erroraccumulators
- The flink and user-defined accumulators which may be null.public Throwable getError(ClassLoader userCodeClassloader)
userCodeClassloader
- The classloader that can resolve user-defined exceptions.public ExecutionAttemptID getID()
public ExecutionState getExecutionState()
public AccumulatorSnapshot getAccumulators()
public IOMetrics getIOMetrics()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.