GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/6189
[FLINK-9599][rest] RestClient supports FileUploads
This PR is based on a squashed #6178.
## What is the purpose of the change
This PR extends the `RestClient` to allow sending multipart messages
containing files and an optional json payload.
@tillrohrmann Regarding the previously discussed issue about
´EMPTY_LAST_HTTP_CONTENT`, you can reproduce the issue by reverting the change
to the `FileUploadHandler` and running the `RestClientMultipartTest`.
## Brief change log
* rework `FileUploadHandlerTest` into an abstract base class, to re-use
classes for the `RestClient`
## Verifying this change
* add `RequestProcess` interface for hiding differences between
non-/multipart messages
* refactor `RestClient#sendRequest` into `internalSendRequest` that allows
passing a `RequestProcessor`
* see `RestClientMultipartTest`
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: (no)
- The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
- The S3 file system connector: (no)
## Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zentol/flink 9280_gamma
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/6189.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #6189
----
commit 97d7eaf2adbc8174025fafd32b3424f05bd27da1
Author: zentol <chesnay@...>
Date: 2018-06-18T08:54:42Z
[FLINK-9599][rest] Implement generic mechanism to access uploaded files
commit 0ea85f1658c3ceca09a481e27392ed39b955d8bb
Author: zentol <chesnay@...>
Date: 2018-06-19T07:45:09Z
[FLINK-9599][rest] RestClient supports FileUploads
----
---