Class ErrorInfo
- java.lang.Object
-
- org.apache.flink.runtime.executiongraph.ErrorInfo
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ExceptionHistoryEntry
public class ErrorInfo extends Object implements Serializable
Simple container to hold an exception and the corresponding timestamp.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ErrorInfo
createErrorInfoWithNullableCause(Throwable exception, long timestamp)
Instantiates anErrorInfo
to cover inconsistent behavior due to FLINK-21376.org.apache.flink.util.SerializedThrowable
getException()
Returns the serialized form of the original exception.String
getExceptionAsString()
Returns the contained exception as a string.long
getTimestamp()
Returns the timestamp for the contained exception.static Throwable
handleMissingThrowable(Throwable throwable)
Utility method to cover FLINK-21376.
-
-
-
Constructor Detail
-
ErrorInfo
public ErrorInfo(@Nonnull Throwable exception, long timestamp)
-
-
Method Detail
-
createErrorInfoWithNullableCause
public static ErrorInfo createErrorInfoWithNullableCause(@Nullable Throwable exception, long timestamp)
Instantiates anErrorInfo
to cover inconsistent behavior due to FLINK-21376.- Parameters:
exception
- The error cause that might benull
.timestamp
- The timestamp the error was noticed.- Returns:
- a
ErrorInfo
containing a genericFlinkException
in case of a missing error cause.
-
handleMissingThrowable
public static Throwable handleMissingThrowable(@Nullable Throwable throwable)
Utility method to cover FLINK-21376.- Parameters:
throwable
- The actual exception.- Returns:
- a
FlinkException
if no exception was passed.
-
getException
public org.apache.flink.util.SerializedThrowable getException()
Returns the serialized form of the original exception.
-
getExceptionAsString
public String 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
-
-