Package org.apache.spark
Class SparkException
- All Implemented Interfaces:
Serializable,SparkThrowable
- Direct Known Subclasses:
CatalogNotFoundException,LoadTableException,UnrecognizedBlockId
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSparkException(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.Succinct, human-readable, unique, and consistent representation of the error condition.static SparkExceptioninternalError(String msg) static SparkExceptioninternalError(String msg, String category) static SparkExceptioninternalError(String msg, Throwable cause) static SparkExceptioninternalError(String msg, QueryContext[] context, String summary) static SparkExceptioninternalError(String msg, QueryContext[] context, String summary, scala.Option<String> category) static RuntimeExceptionmustOverrideOneMethodError(String methodName) static voidrequire(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, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.spark.SparkThrowable
getBreakingChangeInfo, getErrorClass, 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.
-
mustOverrideOneMethodError
-
getMessageParameters
- Specified by:
getMessageParametersin interfaceSparkThrowable
-
getCondition
Description copied from interface:SparkThrowableSuccinct, human-readable, unique, and consistent representation of the error condition. If null, error condition is not set.- Specified by:
getConditionin interfaceSparkThrowable
-
getQueryContext
- Specified by:
getQueryContextin interfaceSparkThrowable
-