Murtadha Hubail has submitted this change and it was merged. ( https://asterix-gerrit.ics.uci.edu/3368 )
Change subject: [NO ISSUE][API] Return Bad Request on Insufficient Cluster Resources ...................................................................... [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 <[email protected]> Tested-by: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Reviewed-by: Ali Alsuliman <[email protected]> --- M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/QueryServiceServlet.java 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins: Verified; ; Verified Ali Alsuliman: Looks good to me, approved Objections: Jenkins: Violations found Anon. E. Moose (1000171): Violations found 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.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 @@ 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: -- To view, visit https://asterix-gerrit.ics.uci.edu/3368 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I15500bfa4051a97fe3f5277d318b5a1187da225c Gerrit-Change-Number: 3368 Gerrit-PatchSet: 2 Gerrit-Owner: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Ali Alsuliman <[email protected]> Gerrit-Reviewer: Anon. E. Moose (1000171) Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Michael Blow <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]>
