Class SparkException

Object
Throwable
Exception
org.apache.spark.SparkException
All Implemented Interfaces:
Serializable, SparkThrowable
Direct Known Subclasses:
CatalogNotFoundException, UnrecognizedBlockId

public class SparkException extends Exception implements SparkThrowable
See Also:
  • Constructor Details

  • Method Details

    • internalError

      public static SparkException internalError(String msg, QueryContext[] context, String summary)
    • internalError

      public static SparkException internalError(String msg, QueryContext[] context, String summary, scala.Option<String> category)
    • internalError

      public static SparkException internalError(String msg)
    • internalError

      public static SparkException internalError(String msg, String category)
    • internalError

      public static SparkException internalError(String msg, Throwable cause)
    • require

      public static void require(boolean requirement, String errorClass, scala.Function0<scala.collection.immutable.Map<String,String>> messageParameters)
      This is like the Scala require precondition, except it uses SparkIllegalArgumentException.
      Parameters:
      requirement - The requirement you want to check
      errorClass - The error class to type if the requirement isn't passed
      messageParameters - Message parameters to append to the message
    • constructMessageParams

      public static scala.collection.immutable.Map<String,String> constructMessageParams(Map<String,String> messageParameters)
      Utility method to construct message params from Java Map.
      Parameters:
      messageParameters - The Java Map.
      Returns:
      Scala collection that can be passed to SparkException constructor.
    • getMessageParameters

      public Map<String,String> getMessageParameters()
      Specified by:
      getMessageParameters in interface SparkThrowable
    • getCondition

      public String getCondition()
      Description copied from interface: SparkThrowable
      Succinct, human-readable, unique, and consistent representation of the error condition. If null, error condition is not set.
      Specified by:
      getCondition in interface SparkThrowable
    • getQueryContext

      public QueryContext[] getQueryContext()
      Specified by:
      getQueryContext in interface SparkThrowable