Package org.apache.druid.query
Class QueryInterruptedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.druid.query.QueryException
-
- org.apache.druid.query.QueryInterruptedException
-
- All Implemented Interfaces:
Serializable
,SanitizableException
public class QueryInterruptedException extends QueryException
Exception representing a failed query. The name "QueryInterruptedException" is a misnomer; this is actually used on the client side for *all* kinds of failed queries.Fields: - "errorCode" is a well-defined errorCode code taken from a specific list (see the static constants). "Unknown exception" represents all wrapped exceptions other than interrupt, cancellation, resource limit exceeded, unauthorized request, and unsupported operation. - "errorMessage" is the toString of the wrapped exception - "errorClass" is the class of the wrapped exception - "host" is the host that the errorCode occurred on
The QueryResource is expected to emit the JSON form of this object when errors happen, and the DirectDruidClient deserializes and wraps them.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.druid.query.QueryException
QueryException.FailType
-
-
Field Summary
-
Fields inherited from class org.apache.druid.query.QueryException
BAD_QUERY_CONTEXT_ERROR_CODE, JSON_PARSE_ERROR_CODE, PLAN_VALIDATION_FAILED_ERROR_CODE, QUERY_CANCELED_ERROR_CODE, QUERY_CAPACITY_EXCEEDED_ERROR_CODE, QUERY_INTERRUPTED_ERROR_CODE, QUERY_TIMEOUT_ERROR_CODE, QUERY_UNSUPPORTED_ERROR_CODE, RESOURCE_LIMIT_EXCEEDED_ERROR_CODE, SQL_PARSE_FAILED_ERROR_CODE, SQL_QUERY_UNSUPPORTED_ERROR_CODE, TRUNCATED_RESPONSE_CONTEXT_ERROR_CODE, UNAUTHORIZED_ERROR_CODE, UNKNOWN_EXCEPTION_ERROR_CODE, UNSUPPORTED_OPERATION_ERROR_CODE
-
-
Constructor Summary
Constructors Constructor Description QueryInterruptedException(String errorCode, String errorMessage, String errorClass, String host)
QueryInterruptedException(Throwable cause)
Creates a new QueryInterruptedException wrapping an underlying exception.QueryInterruptedException(Throwable cause, String host)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static QueryInterruptedException
wrapIfNeeded(Throwable e)
-
Methods inherited from class org.apache.druid.query.QueryException
fromErrorCode, getErrorClass, getErrorCode, getFailType, getHost, getMessage, resolveHostname, sanitize, toString
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
QueryInterruptedException
public QueryInterruptedException(@Nullable String errorCode, String errorMessage, @Nullable String errorClass, @Nullable String host)
-
QueryInterruptedException
public QueryInterruptedException(Throwable cause)
Creates a new QueryInterruptedException wrapping an underlying exception. The errorMessage and errorClass of this exception will be based on the highest non-QueryInterruptedException in the causality chain.- Parameters:
cause
- wrapped exception
-
-
Method Detail
-
wrapIfNeeded
public static QueryInterruptedException wrapIfNeeded(Throwable e)
-
-