Class 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 QueryException it is expected to be serialied to a json response, but will be mapped to STATUS_CODE instead of the default HTTP 500 status.

    See Also:
    Serialized Form
    • Constructor Detail

      • QueryCapacityExceededException

        public QueryCapacityExceededException​(int capacity)
      • QueryCapacityExceededException

        public QueryCapacityExceededException​(String lane,
                                              int capacity)
      • QueryCapacityExceededException

        public QueryCapacityExceededException​(String errorCode,
                                              String errorMessage,
                                              String errorClass,
                                              String host)
    • 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)
      • makeLaneErrorMessage

        public static String makeLaneErrorMessage​(String lane,
                                                  int capacity)