Class ErrorInfo

    • Constructor Detail

      • ErrorInfo

        public ErrorInfo​(@Nonnull
                         Throwable exception,
                         long timestamp)
    • Method Detail

      • createErrorInfoWithNullableCause

        public static ErrorInfo createErrorInfoWithNullableCause​(@Nullable
                                                                 Throwable exception,
                                                                 long timestamp)
        Instantiates an ErrorInfo to cover inconsistent behavior due to FLINK-21376.
        Parameters:
        exception - The error cause that might be null.
        timestamp - The timestamp the error was noticed.
        Returns:
        a ErrorInfo containing a generic FlinkException 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