Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancel Async Query API #2126

Merged

Conversation

vmmusings
Copy link
Member

Description

  • This PR covers Cancel Async Query API.
  • Throws error incase of already successful async query and cancels a query which is IN_PROGRESS/QUEUED/RUNNING.
  • Only unit tests are covered since there is not integration test setup.

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Merging #2126 (3a0326a) into feature/job-apis (525a0ae) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@                 Coverage Diff                 @@
##             feature/job-apis    #2126   +/-   ##
===================================================
  Coverage               96.57%   96.58%           
- Complexity               4696     4701    +5     
===================================================
  Files                     433      433           
  Lines                   12387    12410   +23     
  Branches                  847      848    +1     
===================================================
+ Hits                    11963    11986   +23     
  Misses                    413      413           
  Partials                   11       11           
Flag Coverage Δ
sql-engine 96.58% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...ql/datasources/rest/RestDataSourceQueryAction.java 0.00% <ø> (ø)
...sql/spark/rest/RestAsyncQueryManagementAction.java 0.00% <ø> (ø)
...transport/model/CancelAsyncQueryActionRequest.java 0.00% <ø> (ø)
...park/asyncquery/AsyncQueryExecutorServiceImpl.java 100.00% <100.00%> (ø)
...arch/sql/spark/client/EmrServerlessClientImpl.java 100.00% <100.00%> (ø)
...rch/sql/spark/dispatcher/SparkQueryDispatcher.java 100.00% <100.00%> (ø)
...nsport/TransportCancelAsyncQueryRequestAction.java 100.00% <100.00%> (ø)

Signed-off-by: Vamsi Manohar <[email protected]>
@vmmusings vmmusings merged commit 184d3e2 into opensearch-project:feature/job-apis Sep 21, 2023
17 of 19 checks passed
vmmusings added a commit that referenced this pull request Sep 22, 2023
Signed-off-by: Vamsi Manohar <[email protected]>
vmmusings added a commit that referenced this pull request Sep 22, 2023
Signed-off-by: Vamsi Manohar <[email protected]>
vmmusings added a commit that referenced this pull request Sep 27, 2023
* Glue datasource support (#2055)

Signed-off-by: Vamsi Manohar <[email protected]>

* Initial commit of new job APIs (#2050)

Signed-off-by: Vamsi Manohar <[email protected]>

* Create Job API (#2070)

* Create Job API

Signed-off-by: Vamsi Manohar <[email protected]>

* Refactor to Async Query API

Signed-off-by: Vamsi Manohar <[email protected]>

---------

Signed-off-by: Vamsi Manohar <[email protected]>

* Cancel Job API (#2126)

Signed-off-by: Vamsi Manohar <[email protected]>

* Add tags to the emr jobs based on the query types (#2150)

Signed-off-by: Vamsi Manohar <[email protected]>

---------

Signed-off-by: Vamsi Manohar <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 27, 2023
* Glue datasource support (#2055)

Signed-off-by: Vamsi Manohar <[email protected]>

* Initial commit of new job APIs (#2050)

Signed-off-by: Vamsi Manohar <[email protected]>

* Create Job API (#2070)

* Create Job API

Signed-off-by: Vamsi Manohar <[email protected]>

* Refactor to Async Query API

Signed-off-by: Vamsi Manohar <[email protected]>

---------

Signed-off-by: Vamsi Manohar <[email protected]>

* Cancel Job API (#2126)

Signed-off-by: Vamsi Manohar <[email protected]>

* Add tags to the emr jobs based on the query types (#2150)

Signed-off-by: Vamsi Manohar <[email protected]>

---------

Signed-off-by: Vamsi Manohar <[email protected]>
(cherry picked from commit ae10857)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
vmmusings pushed a commit that referenced this pull request Sep 27, 2023
* Glue datasource support (#2055)



* Initial commit of new job APIs (#2050)



* Create Job API (#2070)

* Create Job API



* Refactor to Async Query API



---------



* Cancel Job API (#2126)



* Add tags to the emr jobs based on the query types (#2150)



---------


(cherry picked from commit ae10857)

Signed-off-by: Vamsi Manohar <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
penghuo pushed a commit that referenced this pull request Oct 3, 2023
* Glue datasource support (#2055)

Signed-off-by: Vamsi Manohar <[email protected]>

* Initial commit of new job APIs (#2050)

Signed-off-by: Vamsi Manohar <[email protected]>

* Create Job API (#2070)

* Create Job API

Signed-off-by: Vamsi Manohar <[email protected]>

* Refactor to Async Query API

Signed-off-by: Vamsi Manohar <[email protected]>

---------

Signed-off-by: Vamsi Manohar <[email protected]>

* Cancel Job API (#2126)

Signed-off-by: Vamsi Manohar <[email protected]>

* Fix response codes returned

Signed-off-by: Derek Ho <[email protected]>

* Remove @opensearch datasource, update with new type

Signed-off-by: Derek Ho <[email protected]>

* Spotless Apply

Signed-off-by: Derek Ho <[email protected]>

* Fix tests

Signed-off-by: Derek Ho <[email protected]>

* Revert change back to json string

Signed-off-by: Derek Ho <[email protected]>

* Update tests to use JSON string literal instead of formatting

Signed-off-by: Derek Ho <[email protected]>

* Update IT

Signed-off-by: Derek Ho <[email protected]>

* Fix show datsources IT

Signed-off-by: Derek Ho <[email protected]>

* Remove files from merge

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Vamsi Manohar <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Co-authored-by: Vamsi Manohar <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 3, 2023
* Glue datasource support (#2055)

Signed-off-by: Vamsi Manohar <[email protected]>

* Initial commit of new job APIs (#2050)

Signed-off-by: Vamsi Manohar <[email protected]>

* Create Job API (#2070)

* Create Job API

Signed-off-by: Vamsi Manohar <[email protected]>

* Refactor to Async Query API

Signed-off-by: Vamsi Manohar <[email protected]>

---------

Signed-off-by: Vamsi Manohar <[email protected]>

* Cancel Job API (#2126)

Signed-off-by: Vamsi Manohar <[email protected]>

* Fix response codes returned

Signed-off-by: Derek Ho <[email protected]>

* Remove @opensearch datasource, update with new type

Signed-off-by: Derek Ho <[email protected]>

* Spotless Apply

Signed-off-by: Derek Ho <[email protected]>

* Fix tests

Signed-off-by: Derek Ho <[email protected]>

* Revert change back to json string

Signed-off-by: Derek Ho <[email protected]>

* Update tests to use JSON string literal instead of formatting

Signed-off-by: Derek Ho <[email protected]>

* Update IT

Signed-off-by: Derek Ho <[email protected]>

* Fix show datsources IT

Signed-off-by: Derek Ho <[email protected]>

* Remove files from merge

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Vamsi Manohar <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Co-authored-by: Vamsi Manohar <[email protected]>
(cherry picked from commit 5ce1bab)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
penghuo pushed a commit that referenced this pull request Oct 3, 2023
* Glue datasource support (#2055)



* Initial commit of new job APIs (#2050)



* Create Job API (#2070)

* Create Job API



* Refactor to Async Query API



---------



* Cancel Job API (#2126)



* Fix response codes returned



* Remove @opensearch datasource, update with new type



* Spotless Apply



* Fix tests



* Revert change back to json string



* Update tests to use JSON string literal instead of formatting



* Update IT



* Fix show datsources IT



* Remove files from merge



---------




(cherry picked from commit 5ce1bab)

Signed-off-by: Vamsi Manohar <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Vamsi Manohar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants