Class RootExceptionHistoryEntry
java.lang.Object
org.apache.flink.runtime.executiongraph.ErrorInfo
org.apache.flink.runtime.scheduler.exceptionhistory.ExceptionHistoryEntry
org.apache.flink.runtime.scheduler.exceptionhistory.RootExceptionHistoryEntry
- All Implemented Interfaces:
Serializable
RootExceptionHistoryEntry extending ExceptionHistoryEntry by providing a list of
ExceptionHistoryEntry instances to store concurrently caught failures.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.flink.runtime.scheduler.exceptionhistory.ExceptionHistoryEntry
ExceptionHistoryEntry.ArchivedTaskManagerLocation -
Constructor Summary
ConstructorsConstructorDescriptionRootExceptionHistoryEntry(Throwable cause, long timestamp, CompletableFuture<Map<String, String>> failureLabels, String failingTaskName, TaskManagerLocation taskManagerLocation, Collection<ExceptionHistoryEntry> concurrentExceptions) Instantiates aRootExceptionHistoryEntry. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConcurrentExceptions(Iterable<Execution> concurrentlyExecutions) static RootExceptionHistoryEntryfromExceptionHistoryEntry(ExceptionHistoryEntry entry, Collection<ExceptionHistoryEntry> entries) static RootExceptionHistoryEntryCreates aRootExceptionHistoryEntrybased on the passedFailureHandlingResultSnapshot.static RootExceptionHistoryEntryfromGlobalFailure(Throwable cause, long timestamp, CompletableFuture<Map<String, String>> failureLabels, Iterable<Execution> executions) Creates aRootExceptionHistoryEntryrepresenting a global failure from the passedThrowableand timestamp.static RootExceptionHistoryEntryfromGlobalFailure(ErrorInfo errorInfo) Creates aRootExceptionHistoryEntrybased on the passedErrorInfo.Methods inherited from class org.apache.flink.runtime.scheduler.exceptionhistory.ExceptionHistoryEntry
create, createGlobal, getFailingTaskName, getFailureLabels, getFailureLabelsFuture, getTaskManagerLocation, isGlobalMethods inherited from class org.apache.flink.runtime.executiongraph.ErrorInfo
createErrorInfoWithNullableCause, getException, getExceptionAsString, getTimestamp, handleMissingThrowable
-
Constructor Details
-
RootExceptionHistoryEntry
@VisibleForTesting public RootExceptionHistoryEntry(Throwable cause, long timestamp, CompletableFuture<Map<String, String>> failureLabels, @Nullable String failingTaskName, @Nullable TaskManagerLocation taskManagerLocation, Collection<ExceptionHistoryEntry> concurrentExceptions) Instantiates aRootExceptionHistoryEntry.- Parameters:
cause- The reason for the failure.timestamp- The time the failure was caught.failureLabels- 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
-
fromFailureHandlingResultSnapshot
public static RootExceptionHistoryEntry fromFailureHandlingResultSnapshot(FailureHandlingResultSnapshot snapshot) Creates aRootExceptionHistoryEntrybased on the passedFailureHandlingResultSnapshot.- Parameters:
snapshot- The reason for the failure.- Returns:
- The
RootExceptionHistoryEntryinstance. - Throws:
NullPointerException- ifcauseorfailingTaskNamearenull.IllegalArgumentException- if thetimestampof the passedFailureHandlingResultis not bigger than0.
-
fromGlobalFailure
public static RootExceptionHistoryEntry fromGlobalFailure(Throwable cause, long timestamp, CompletableFuture<Map<String, String>> failureLabels, Iterable<Execution> executions) Creates aRootExceptionHistoryEntryrepresenting a global failure from the passedThrowableand timestamp. If any of the passedExecutionsfailed, it will be added to theRootExceptionHistoryEntry's concurrently caught failures.- Parameters:
cause- The reason for the failure.timestamp- The time the failure was caught.failureLabels- Map of string labels associated with the failure.executions- TheExecutioninstances that shall be analyzed for failures.- Returns:
- The
RootExceptionHistoryEntryinstance. - Throws:
NullPointerException- iffailureisnull.IllegalArgumentException- if the passedtimestampis not bigger than0.
-
fromExceptionHistoryEntry
public static RootExceptionHistoryEntry fromExceptionHistoryEntry(ExceptionHistoryEntry entry, Collection<ExceptionHistoryEntry> entries) -
fromGlobalFailure
Creates aRootExceptionHistoryEntrybased on the passedErrorInfo. No concurrent failures will be added.- Parameters:
errorInfo- The failure information that shall be used to initialize theRootExceptionHistoryEntry.- Returns:
- The
RootExceptionHistoryEntryinstance. - Throws:
NullPointerException- iferrorInfoisnullor the passed info does not contain aThrowable.IllegalArgumentException- if the passedtimestampis not bigger than0.
-
addConcurrentExceptions
-
getConcurrentExceptions
-