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
@NotThreadSafe public class RootExceptionHistoryEntry extends ExceptionHistoryEntry
RootExceptionHistoryEntryextendingExceptionHistoryEntryby providing a list ofExceptionHistoryEntryinstances to store concurrently caught failures.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.runtime.scheduler.exceptionhistory.ExceptionHistoryEntry
ExceptionHistoryEntry.ArchivedTaskManagerLocation
-
-
Constructor Summary
Constructors Constructor Description RootExceptionHistoryEntry(Throwable cause, long timestamp, CompletableFuture<Map<String,String>> failureLabels, String failingTaskName, TaskManagerLocation taskManagerLocation, Collection<ExceptionHistoryEntry> concurrentExceptions)Instantiates aRootExceptionHistoryEntry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConcurrentExceptions(Iterable<Execution> concurrentlyExecutions)static RootExceptionHistoryEntryfromExceptionHistoryEntry(ExceptionHistoryEntry entry, Collection<ExceptionHistoryEntry> entries)static RootExceptionHistoryEntryfromFailureHandlingResultSnapshot(FailureHandlingResultSnapshot snapshot)Creates 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.Iterable<ExceptionHistoryEntry>getConcurrentExceptions()-
Methods inherited from class org.apache.flink.runtime.scheduler.exceptionhistory.ExceptionHistoryEntry
create, createGlobal, getFailingTaskName, getFailureLabels, getFailureLabelsFuture, getTaskManagerLocation, isGlobal
-
Methods inherited from class org.apache.flink.runtime.executiongraph.ErrorInfo
createErrorInfoWithNullableCause, getException, getExceptionAsString, getTimestamp, handleMissingThrowable
-
-
-
-
Constructor Detail
-
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 Detail
-
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
public static RootExceptionHistoryEntry fromGlobalFailure(ErrorInfo errorInfo)
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
public void addConcurrentExceptions(Iterable<Execution> concurrentlyExecutions)
-
getConcurrentExceptions
public Iterable<ExceptionHistoryEntry> getConcurrentExceptions()
-
-