Package org.apache.spark
Class SparkException
- All Implemented Interfaces:
Serializable
,SparkThrowable
- Direct Known Subclasses:
CatalogNotFoundException
,UnrecognizedBlockId
- See Also:
-
Constructor Summary
ConstructorDescriptionSparkException
(String message) SparkException
(String message, Throwable cause) SparkException
(String message, Throwable cause, scala.Option<String> errorClass, scala.collection.immutable.Map<String, String> messageParameters, QueryContext[] context) SparkException
(String errorClass, scala.collection.immutable.Map<String, String> messageParameters, Throwable cause) SparkException
(String errorClass, scala.collection.immutable.Map<String, String> messageParameters, Throwable cause, QueryContext[] context) SparkException
(String errorClass, scala.collection.immutable.Map<String, String> messageParameters, Throwable cause, QueryContext[] context, String summary) -
Method Summary
Modifier and TypeMethodDescriptionconstructMessageParams
(Map<String, String> messageParameters) Utility method to construct message params from Java Map.static SparkException
internalError
(String msg) static SparkException
internalError
(String msg, String category) static SparkException
internalError
(String msg, Throwable cause) static SparkException
internalError
(String msg, QueryContext[] context, String summary) static SparkException
internalError
(String msg, QueryContext[] context, String summary, scala.Option<String> category) 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.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.spark.SparkThrowable
getSqlState, isInternalError
-
Constructor Details
-
SparkException
-
SparkException
-
SparkException
-
SparkException
-
SparkException
-
SparkException
public SparkException(String errorClass, scala.collection.immutable.Map<String, String> messageParameters, Throwable cause, QueryContext[] context)
-
-
Method Details
-
internalError
-
internalError
public static SparkException internalError(String msg, QueryContext[] context, String summary, scala.Option<String> category) -
internalError
-
internalError
-
internalError
-
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 checkerrorClass
- The error class to type if the requirement isn't passedmessageParameters
- 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
- Specified by:
getMessageParameters
in interfaceSparkThrowable
-
getErrorClass
- Specified by:
getErrorClass
in interfaceSparkThrowable
-
getQueryContext
- Specified by:
getQueryContext
in interfaceSparkThrowable
-