### _Why are the changes needed?_ to close #4106 . 1. add `POST /batches`API in `BatchesResource` of REST API, which consumes `multipart/form-data` media type to support uploading `resourcefile`. And a `batchRequest` form data part in the JSON format string of `BatchRequest`, as in the required request body of `POST /batches` 2. the uploaded `resourceFile` is saved to a temp local file which will be cleaned up after job execution at the end of `submitAndMonitorBatchJob` 3. the local temp copy of `resourceFile` will be used as `resource` in `BatchJobSubmission`, eg. as <application-jar> for spark-submit Todos in follow-up: 1. add a related description in Rest API doc 4. add `multipart` media type support to `RestClient` and implement `createBatchWithUploadingResource` in `BatchRestApi` ### _How was this patch tested?_ - [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4144 from bowenliang123/rest-batch-upload. Closes #4106 f6723a02 [Bowen Liang] Merge branch 'master' into rest-batch-upload 0dd67245 [liangbowen] correct dependencyList 6365a0cd [liangbowen] introducing resource file upload support in batch creation Lead-authored-by: liangbowen <liangbowen@gf.com.cn> Co-authored-by: Bowen Liang <bowenliang@apache.org> Signed-off-by: liangbowen <liangbowen@gf.com.cn> |
||
|---|---|---|
| .. | ||
| kyuubi-codecov | ||
| kyuubi-tpcds | ||
| checkout_pr.sh | ||
| dependencyList | ||
| merge_kyuubi_pr.py | ||
| reformat | ||