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

[FLINK-9211][REST] JarRunHandler submits job to Dispatcher via RPC #5903

Closed
wants to merge 3 commits into from

Conversation

zentol
Copy link
Contributor

@zentol zentol commented Apr 24, 2018

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)

Copy link
Contributor

@aljoscha aljoscha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good! 👍 Just had one inline question.

});

CompletableFuture<Acknowledge> jobSubmissionFuture = jarUploadFuture.thenCompose(jobGraph -> {
// we have to enable queued scheduling because slots will be allocated lazily
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this also what the thing sitting behind the REST endpoint does?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enabling queued scheduling

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If by the thing sitting behind the REST endpoint you mean the Dispatcher, then no, it does not enable queued scheduling, but effectively relies on it being enabled. If you don't enable it beforehand in the client/handler the job submission will outright fail with an entirely unhelpful error message.

The Dispatcher should probably enable it though, but that isn't really in the scope of this PR as it would also affect the RestClusterClient which does the same thing.
Technically it may also be questionably as it would invalidate part of the JobGraph API.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha. I think that's way off topic, so this is still good to merge

@zentol
Copy link
Contributor Author

zentol commented May 2, 2018

merging.

zentol added a commit to zentol/flink that referenced this pull request May 2, 2018
zentol added a commit to zentol/flink that referenced this pull request May 2, 2018
zentol added a commit to zentol/flink that referenced this pull request May 2, 2018
zentol added a commit to zentol/flink that referenced this pull request May 2, 2018
zentol added a commit to zentol/flink that referenced this pull request May 2, 2018
asfgit pushed a commit that referenced this pull request May 2, 2018
@asfgit asfgit closed this in e884a3a May 2, 2018
@zentol zentol deleted the 9211 branch May 2, 2018 13:26
sampathBhat pushed a commit to sampathBhat/flink that referenced this pull request Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants