Class ErrorInfo
java.lang.Object
org.apache.flink.runtime.executiongraph.ErrorInfo
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ExceptionHistoryEntry
Simple container to hold an exception and the corresponding timestamp.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorInfocreateErrorInfoWithNullableCause(Throwable exception, long timestamp) Instantiates anErrorInfoto cover inconsistent behavior due to FLINK-21376.org.apache.flink.util.SerializedThrowableReturns the serialized form of the original exception.Returns the contained exception as a string.longReturns the timestamp for the contained exception.static ThrowablehandleMissingThrowable(Throwable throwable) Utility method to cover FLINK-21376.
-
Constructor Details
-
ErrorInfo
-
-
Method Details
-
createErrorInfoWithNullableCause
public static ErrorInfo createErrorInfoWithNullableCause(@Nullable Throwable exception, long timestamp) Instantiates anErrorInfoto cover inconsistent behavior due to FLINK-21376.- Parameters:
exception- The error cause that might benull.timestamp- The timestamp the error was noticed.- Returns:
- a
ErrorInfocontaining a genericFlinkExceptionin case of a missing error cause.
-
handleMissingThrowable
Utility method to cover FLINK-21376.- Parameters:
throwable- The actual exception.- Returns:
- a
FlinkExceptionif no exception was passed.
-
getException
public org.apache.flink.util.SerializedThrowable getException()Returns the serialized form of the original exception. -
getExceptionAsString
Returns the contained exception as a string.- Returns:
- failure causing exception as a string, or
"(null)"
-
getTimestamp
public long getTimestamp()Returns the timestamp for the contained exception.- Returns:
- timestamp of contained exception, or 0 if no exception was set
-