public class ExceptionHistoryEntry extends ErrorInfo
ExceptionHistoryEntry
collects information about a single failure that triggered the
scheduler's failure handling.Modifier and Type | Class and Description |
---|---|
static class |
ExceptionHistoryEntry.ArchivedTaskManagerLocation
ArchivedTaskManagerLocation represents a archived (static) version of a TaskManagerLocation . |
Modifier | Constructor and Description |
---|---|
protected |
ExceptionHistoryEntry(Throwable cause,
long timestamp,
CompletableFuture<Map<String,String>> failureLabels,
String failingTaskName,
TaskManagerLocation taskManagerLocation)
Instantiates a
ExceptionHistoryEntry . |
Modifier and Type | Method and Description |
---|---|
static ExceptionHistoryEntry |
create(AccessExecution failedExecution,
String taskName,
CompletableFuture<Map<String,String>> failureLabels)
Creates an
ExceptionHistoryEntry based on the provided Execution . |
static ExceptionHistoryEntry |
createGlobal(Throwable cause,
CompletableFuture<Map<String,String>> failureLabels)
Creates an
ExceptionHistoryEntry that is not based on an Execution . |
String |
getFailingTaskName() |
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.ArchivedTaskManagerLocation |
getTaskManagerLocation() |
boolean |
isGlobal() |
createErrorInfoWithNullableCause, getException, getExceptionAsString, getTimestamp, handleMissingThrowable
protected ExceptionHistoryEntry(Throwable cause, long timestamp, CompletableFuture<Map<String,String>> failureLabels, @Nullable String failingTaskName, @Nullable TaskManagerLocation taskManagerLocation)
ExceptionHistoryEntry
.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.NullPointerException
- if cause
is null
.IllegalArgumentException
- if the passed timestamp
is not bigger than 0
.public static ExceptionHistoryEntry create(AccessExecution failedExecution, String taskName, CompletableFuture<Map<String,String>> failureLabels)
ExceptionHistoryEntry
based on the provided Execution
.failedExecution
- the failed Execution
.taskName
- the name of the task.failureLabels
- the labels associated with the failure.ExceptionHistoryEntry
.NullPointerException
- if null
is passed as one of the parameters.IllegalArgumentException
- if the passed Execution
does not provide a failureInfo
.public static ExceptionHistoryEntry createGlobal(Throwable cause, CompletableFuture<Map<String,String>> failureLabels)
ExceptionHistoryEntry
that is not based on an Execution
.public boolean isGlobal()
@Nullable public ExceptionHistoryEntry.ArchivedTaskManagerLocation getTaskManagerLocation()
public Map<String,String> getFailureLabels()
public CompletableFuture<Map<String,String>> getFailureLabelsFuture()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.