You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mh...@apache.org on 2019/04/30 19:00:20 UTC

[asterixdb] branch master updated: [NO ISSUE][API] Return Bad Request on Insufficient Cluster Resources

This is an automated email from the ASF dual-hosted git repository.

mhubail pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git


The following commit(s) were added to refs/heads/master by this push:
     new a2c9412  [NO ISSUE][API] Return Bad Request on Insufficient Cluster Resources
a2c9412 is described below

commit a2c94127b9a5c48d96039ef35b618cd64f343b1d
Author: Murtadha Hubail <mh...@apache.org>
AuthorDate: Tue Apr 30 14:54:50 2019 +0400

    [NO ISSUE][API] Return Bad Request on Insufficient Cluster Resources
    
    - user model changes: yes
    - storage format changes: no
    - interface changes: no
    
    Details:
    - Return (400 Bad Request) when a job cannot be executed
      due to limited cluster resources.
    
    Change-Id: I15500bfa4051a97fe3f5277d318b5a1187da225c
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/3368
    Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Ali Alsuliman <al...@gmail.com>
---
 .../java/org/apache/asterix/api/http/server/QueryServiceServlet.java   | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
index 1c66ce8..26e7430 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java
@@ -23,6 +23,8 @@ import static org.apache.asterix.common.exceptions.ErrorCode.NO_STATEMENT_PROVID
 import static org.apache.asterix.common.exceptions.ErrorCode.REJECT_BAD_CLUSTER_STATE;
 import static org.apache.asterix.common.exceptions.ErrorCode.REJECT_NODE_UNREGISTERED;
 import static org.apache.asterix.common.exceptions.ErrorCode.REQUEST_TIMEOUT;
+import static org.apache.hyracks.api.exceptions.ErrorCode.HYRACKS;
+import static org.apache.hyracks.api.exceptions.ErrorCode.JOB_REQUIREMENTS_EXCEED_CAPACITY;
 
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -675,6 +677,7 @@ public class QueryServiceServlet extends AbstractQueryApiServlet {
                     state.setStatus(ResultStatus.FATAL, HttpResponseStatus.SERVICE_UNAVAILABLE);
                     break;
                 case ASTERIX + NO_STATEMENT_PROVIDED:
+                case HYRACKS + JOB_REQUIREMENTS_EXCEED_CAPACITY:
                     state.setStatus(ResultStatus.FATAL, HttpResponseStatus.BAD_REQUEST);
                     break;
                 default: