presto
presto copied to clipboard
Add LocalTask for Batch Velox
This PR add support for LocalTask which is used by Batch Velox connector It will be used for communication between NativeEngine operator in Java worker(will be added in a separate PR) and presto_cpp worker. It reuse two of the http endpoint from presto, both are supported in presto_cpp.
- POST to /v1/task/{taskId} starts execution of the query fragment specified in the POST body. The request includes a set of initial splits to process.
- GET on /v1/task/{taskId} returns a TaskInfo JSON document containing extended information about the execution status. More details in https://prestodb.io/docs/current/develop/worker-protocol.html
Given LocalTask and RemoteTask are used in different product (Batch Velox vs Presto) and the workload is also different, we decided to keep them separate and we can evolve one of them without breaking the other one. We are also considering using separate http endpoint for Batch Velox vs Presto, but it will be done in future PR.
Test plan - Added unit test TestLocalTask
Please make sure your submission complies with our Development, Formatting, and Commit Message guidelines. Don't forget to follow our attribution guidelines for any code copied from other projects.
Fill in the release notes towards the bottom of the PR description. See Release Notes Guidelines for details.
== RELEASE NOTES ==
General Changes
* ...
* ...
Hive Changes
* ...
* ...
If release note is NOT required, use:
== NO RELEASE NOTE ==
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: chenyangfb (0c6a3fa6d1d2596aef39ae2bd24aa8c41c4e1c22)
Before reviewing, please make sure tests pass especially those checkstyle/unittest ones
LGTM
Thanks for the revision. Overall looks good. I have put some comments on some minor places.
Thanks @chenyangfb! some final comments
Thanks @tangjiangling, updated based on comments.
@tanjialiang, could you take another look? The merge needs your approval.
Are we able to merge now?