public class RootExceptionHistoryEntry extends ExceptionHistoryEntry
RootExceptionHistoryEntry
extending ExceptionHistoryEntry
by providing a list of
ExceptionHistoryEntry
instances to store concurrently caught failures.ExceptionHistoryEntry.ArchivedTaskManagerLocation
Constructor and Description |
---|
RootExceptionHistoryEntry(Throwable cause,
long timestamp,
String failingTaskName,
TaskManagerLocation taskManagerLocation,
Iterable<ExceptionHistoryEntry> concurrentExceptions)
Instantiates a
RootExceptionHistoryEntry . |
Modifier and Type | Method and Description |
---|---|
static RootExceptionHistoryEntry |
fromExceptionHistoryEntry(ExceptionHistoryEntry entry,
Iterable<ExceptionHistoryEntry> entries) |
static RootExceptionHistoryEntry |
fromFailureHandlingResultSnapshot(FailureHandlingResultSnapshot snapshot)
Creates a
RootExceptionHistoryEntry based on the passed FailureHandlingResultSnapshot . |
static RootExceptionHistoryEntry |
fromGlobalFailure(ErrorInfo errorInfo)
Creates a
RootExceptionHistoryEntry based on the passed ErrorInfo . |
static RootExceptionHistoryEntry |
fromGlobalFailure(Throwable cause,
long timestamp,
Iterable<Execution> executions)
Creates a
RootExceptionHistoryEntry representing a global failure from the passed
Throwable and timestamp. |
Iterable<ExceptionHistoryEntry> |
getConcurrentExceptions() |
create, createGlobal, getFailingTaskName, getTaskManagerLocation, isGlobal
createErrorInfoWithNullableCause, getException, getExceptionAsString, getTimestamp, handleMissingThrowable
@VisibleForTesting public RootExceptionHistoryEntry(Throwable cause, long timestamp, @Nullable String failingTaskName, @Nullable TaskManagerLocation taskManagerLocation, Iterable<ExceptionHistoryEntry> concurrentExceptions)
RootExceptionHistoryEntry
.cause
- The reason for the failure.timestamp
- The time the failure was caught.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 RootExceptionHistoryEntry fromFailureHandlingResultSnapshot(FailureHandlingResultSnapshot snapshot)
RootExceptionHistoryEntry
based on the passed FailureHandlingResultSnapshot
.snapshot
- The reason for the failure.RootExceptionHistoryEntry
instance.NullPointerException
- if cause
or failingTaskName
are null
.IllegalArgumentException
- if the timestamp
of the passed FailureHandlingResult
is not bigger than 0
.public static RootExceptionHistoryEntry fromGlobalFailure(Throwable cause, long timestamp, Iterable<Execution> executions)
RootExceptionHistoryEntry
representing a global failure from the passed
Throwable
and timestamp. If any of the passed Executions
failed, it
will be added to the RootExceptionHistoryEntry
's concurrently caught failures.cause
- The reason for the failure.timestamp
- The time the failure was caught.executions
- The Execution
instances that shall be analyzed for failures.RootExceptionHistoryEntry
instance.NullPointerException
- if failure
is null
.IllegalArgumentException
- if the passed timestamp
is not bigger than 0
.public static RootExceptionHistoryEntry fromExceptionHistoryEntry(ExceptionHistoryEntry entry, Iterable<ExceptionHistoryEntry> entries)
public static RootExceptionHistoryEntry fromGlobalFailure(ErrorInfo errorInfo)
RootExceptionHistoryEntry
based on the passed ErrorInfo
. No
concurrent failures will be added.errorInfo
- The failure information that shall be used to initialize the RootExceptionHistoryEntry
.RootExceptionHistoryEntry
instance.NullPointerException
- if errorInfo
is null
or the passed info does not
contain a Throwable
.IllegalArgumentException
- if the passed timestamp
is not bigger than 0
.public Iterable<ExceptionHistoryEntry> getConcurrentExceptions()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.