Class ExceptionFailure

Object
org.apache.spark.ExceptionFailure
All Implemented Interfaces:
Serializable, TaskEndReason, TaskFailedReason, scala.Equals, scala.Product

public class ExceptionFailure extends Object implements TaskFailedReason, scala.Product, Serializable
:: DeveloperApi :: Task failed due to a runtime exception. This is the most common failure case and also captures user program exceptions.

stackTrace contains the stack trace of the exception itself. It still exists for backward compatibility. It's better to use this(e: Throwable, metrics: Option[TaskMetrics]) to create ExceptionFailure as it will handle the backward compatibility properly.

fullStackTrace is a better representation of the stack trace because it contains the whole stack trace including the exception and its causes

exception is the actual exception that caused the task to fail. It may be None in the case that the exception is not in fact serializable. If a task fails more than once (due to retries), exception is that one that caused the last failure.

See Also:
  • Constructor Details

    • ExceptionFailure

      public ExceptionFailure(String className, String description, StackTraceElement[] stackTrace, String fullStackTrace, scala.Option<org.apache.spark.ThrowableSerializationWrapper> exceptionWrapper, scala.collection.immutable.Seq<AccumulableInfo> accumUpdates, scala.collection.immutable.Seq<AccumulatorV2<?,?>> accums, scala.collection.immutable.Seq<Object> metricPeaks)
  • Method Details

    • apply

      public abstract static R apply(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5, T6 v6, T7 v7, T8 v8)
    • toString

      public static String toString()
    • className

      public String className()
    • description

      public String description()
    • stackTrace

      public StackTraceElement[] stackTrace()
    • fullStackTrace

      public String fullStackTrace()
    • accumUpdates

      public scala.collection.immutable.Seq<AccumulableInfo> accumUpdates()
    • exception

      public scala.Option<Throwable> exception()
    • toErrorString

      public String toErrorString()
      Description copied from interface: TaskFailedReason
      Error message displayed in the web UI.
      Specified by:
      toErrorString in interface TaskFailedReason