GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/5903
[FLINK-9211][REST] JarRunHandler submits job to Dispatcher via RPC
## What is the purpose of the change
This PR reworks the `JarRunHandler` to submit the job to the dispatcher via
RPC, instead of setting up a `RestClusterClient` and going through the client's
job-submission routine.
The reasoning is that the existing behavior was causing issues on
kubernetes, and this change also removes a special-case as this was the only
handler that actively sends out rest requests.
## Brief change log
* `JarRunHandler` now has access to `DispatcherGateway`
* `JarRunHandler` now uploads jar and submits job via RPC
## Verifying this change
* run `JarRunHandlerTest`
* submit job through webUI
## 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: (yes)
- 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 9211
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5903.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 #5903
----
commit e662220a50ed2f430cfc15082af11ab24f233bf9
Author: zentol <chesnay@...>
Date: 2018-04-23T10:35:51Z
[FLINK-9211][REST] JarRunHandler submits job to Dispatcher via RPC
commit 51772685541adb185ffebcc5800d4eb6e60d35d3
Author: zentol <chesnay@...>
Date: 2018-04-24T09:34:11Z
add test
----
---