Class ExceptionHistoryEntry
java.lang.Object
org.apache.flink.runtime.executiongraph.ErrorInfo
org.apache.flink.runtime.scheduler.exceptionhistory.ExceptionHistoryEntry
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RootExceptionHistoryEntry
ExceptionHistoryEntry collects information about a single failure that triggered the
scheduler's failure handling.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classArchivedTaskManagerLocationrepresents a archived (static) version of aTaskManagerLocation. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExceptionHistoryEntry(Throwable cause, long timestamp, CompletableFuture<Map<String, String>> failureLabels, String failingTaskName, TaskManagerLocation taskManagerLocation) Instantiates aExceptionHistoryEntry. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExceptionHistoryEntrycreate(AccessExecution failedExecution, String taskName, CompletableFuture<Map<String, String>> failureLabels) Creates anExceptionHistoryEntrybased on the providedExecution.static ExceptionHistoryEntrycreateGlobal(Throwable cause, CompletableFuture<Map<String, String>> failureLabels) Creates anExceptionHistoryEntrythat is not based on anExecution.Returns the labels associated with the failure that is set as soon as failureLabelsFuture is completed.Returns the labels future associated with the failure.booleanisGlobal()Methods inherited from class org.apache.flink.runtime.executiongraph.ErrorInfo
createErrorInfoWithNullableCause, getException, getExceptionAsString, getTimestamp, handleMissingThrowable
-
Constructor Details
-
ExceptionHistoryEntry
protected ExceptionHistoryEntry(Throwable cause, long timestamp, CompletableFuture<Map<String, String>> failureLabels, @Nullable String failingTaskName, @Nullable TaskManagerLocation taskManagerLocation) Instantiates aExceptionHistoryEntry.- Parameters:
cause- The reason for the failure.timestamp- The time the failure was caught.failureLabels- The labels associated with the failure.failingTaskName- The name of the task that failed.taskManagerLocation- The host the task was running on.- Throws:
NullPointerException- ifcauseisnull.IllegalArgumentException- if the passedtimestampis not bigger than0.
-
-
Method Details
-
create
public static ExceptionHistoryEntry create(AccessExecution failedExecution, String taskName, CompletableFuture<Map<String, String>> failureLabels) Creates anExceptionHistoryEntrybased on the providedExecution.- Parameters:
failedExecution- the failedExecution.taskName- the name of the task.failureLabels- the labels associated with the failure.- Returns:
- The
ExceptionHistoryEntry. - Throws:
NullPointerException- ifnullis passed as one of the parameters.IllegalArgumentException- if the passedExecutiondoes not provide afailureInfo.
-
createGlobal
public static ExceptionHistoryEntry createGlobal(Throwable cause, CompletableFuture<Map<String, String>> failureLabels) Creates anExceptionHistoryEntrythat is not based on anExecution. -
isGlobal
public boolean isGlobal() -
getFailingTaskName
-
getTaskManagerLocation
-
getFailureLabels
Returns the labels associated with the failure that is set as soon as failureLabelsFuture is completed. When failureLabelsFuture is not completed, it returns an empty map.- Returns:
- Map of failure labels
-
getFailureLabelsFuture
Returns the labels future associated with the failure.- Returns:
- CompletableFuture of Map failure labels
-