SparkException (Spark 4.2.0 JavaDoc)
- All Implemented Interfaces:
Serializable,SparkThrowable
- Direct Known Subclasses:
CatalogNotFoundException,ShuffleStatusNotFoundException,UnrecognizedBlockId
- See Also:
-
Constructor Summary
Constructors
-
Method Summary
static scala.collection.immutable.Map<String,String> Utility method to construct message params from Java Map.
Succinct, human-readable, unique, and consistent representation of the error condition.
================================================ Server side exceptions should override this method and use a provided SQL state property instead.
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, toString
-
Constructor Details
-
SparkException
public SparkException
(String message, Throwable cause, scala.Option<String> errorClass, scala.collection.immutable.Map<String, String> messageParameters, QueryContext[] context, scala.Option<String> sqlState) -
SparkException
-
SparkException
public SparkException
(String message) -
SparkException
-
SparkException
-
SparkException
public SparkException
(String errorClass, scala.collection.immutable.Map<String, String> messageParameters, Throwable cause) -
SparkException
-
-
Method Details
-
internalError
-
internalError
-
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
public String getCondition()
Succinct, human-readable, unique, and consistent representation of the error condition. If null, error condition is not set.
- Specified by:
getConditionin interfaceSparkThrowable
-
getSqlState
public String getSqlState()
================================================ Server side exceptions should override this method and use a provided SQL state property instead. ================================================
- Specified by:
getSqlStatein interfaceSparkThrowable
-
getQueryContext
- Specified by:
getQueryContextin interfaceSparkThrowable
-