Package org.apache.druid.query
Class QueryCapacityExceededException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.druid.query.QueryException
-
- org.apache.druid.query.QueryCapacityExceededException
-
- All Implemented Interfaces:
Serializable,SanitizableException
public class QueryCapacityExceededException extends QueryException
This exception is for QueryResource and SqlResource to surface when a query is cast away after it hits a resource limit. It is currently used in 2 places:- When the query is rejected by QueryScheduler.
- When the query cannot acquire enough merge buffers for groupBy
As a
QueryExceptionit is expected to be serialied to a json response, but will be mapped toSTATUS_CODEinstead of the default HTTP 500 status.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.druid.query.QueryException
QueryException.FailType
-
-
Field Summary
Fields Modifier and Type Field Description static intSTATUS_CODE-
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 QueryCapacityExceededException(int capacity)QueryCapacityExceededException(String lane, int capacity)QueryCapacityExceededException(String errorCode, String errorMessage, String errorClass, String host)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringmakeLaneErrorMessage(String lane, int capacity)static StringmakeTotalErrorMessage(int capacity)static QueryCapacityExceededExceptionwithErrorMessageAndResolvedHost(String errorMessage)This method sets hostName unlike constructors because this can be called in historicals while those constructors are only used in brokers.-
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
-
-
-
-
Field Detail
-
STATUS_CODE
public static final int STATUS_CODE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
QueryCapacityExceededException
public QueryCapacityExceededException(int capacity)
-
QueryCapacityExceededException
public QueryCapacityExceededException(String lane, int capacity)
-
-
Method Detail
-
withErrorMessageAndResolvedHost
public static QueryCapacityExceededException withErrorMessageAndResolvedHost(String errorMessage)
This method sets hostName unlike constructors because this can be called in historicals while those constructors are only used in brokers.
-
makeTotalErrorMessage
public static String makeTotalErrorMessage(int capacity)
-
-