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
public class ExceptionHistoryEntry extends ErrorInfo
ExceptionHistoryEntrycollects information about a single failure that triggered the scheduler's failure handling.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExceptionHistoryEntry.ArchivedTaskManagerLocationArchivedTaskManagerLocationrepresents a archived (static) version of aTaskManagerLocation.
-
Constructor Summary
Constructors Modifier Constructor Description protectedExceptionHistoryEntry(Throwable cause, long timestamp, CompletableFuture<Map<String,String>> failureLabels, String failingTaskName, TaskManagerLocation taskManagerLocation)Instantiates aExceptionHistoryEntry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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.StringgetFailingTaskName()Map<String,String>getFailureLabels()Returns the labels associated with the failure that is set as soon as failureLabelsFuture is completed.CompletableFuture<Map<String,String>>getFailureLabelsFuture()Returns the labels future associated with the failure.ExceptionHistoryEntry.ArchivedTaskManagerLocationgetTaskManagerLocation()booleanisGlobal()-
Methods inherited from class org.apache.flink.runtime.executiongraph.ErrorInfo
createErrorInfoWithNullableCause, getException, getExceptionAsString, getTimestamp, handleMissingThrowable
-
-
-
-
Constructor Detail
-
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 Detail
-
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
@Nullable public String getFailingTaskName()
-
getTaskManagerLocation
@Nullable public ExceptionHistoryEntry.ArchivedTaskManagerLocation getTaskManagerLocation()
-
getFailureLabels
public Map<String,String> 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
public CompletableFuture<Map<String,String>> getFailureLabelsFuture()
Returns the labels future associated with the failure.- Returns:
- CompletableFuture of Map failure labels
-
-