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 ErrorInfocreateErrorInfoWithNullableCause(Throwable exception, long timestamp)Instantiates anErrorInfoto cover inconsistent behavior due to FLINK-21376.org.apache.flink.util.SerializedThrowablegetException()Returns the serialized form of the original exception.StringgetExceptionAsString()Returns the contained exception as a string.longgetTimestamp()Returns the timestamp for the contained exception.static ThrowablehandleMissingThrowable(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 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
public static Throwable handleMissingThrowable(@Nullable Throwable throwable)
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
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
-
-