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

Add job submission to Flink runner. #15

Open
wants to merge 2 commits into
base: flink-portable-runner
Choose a base branch
from

Conversation

axelmagn
Copy link

@axelmagn axelmagn commented Mar 6, 2018

This includes both a generic framework for job submission via gRPC, as well as a concrete implementation for the Flink runner.

axelmagn added 2 commits March 6, 2018 13:36
Adds a JobService implementation to java-fn-execution that should be
generalizable across runners that implement the new JobInvoker and
JobInvocation interfaces.
This implements job invocation wrappers for the Flink runner, as well as
a standalone driver for a JobService daemon.  Together these complete
the job submission story for the portability framework on the Flink
runner.
/**
* Invocation of a Flink Job via {@link FlinkRunner}.
*/
public class FlinkJobInvocation implements JobInvocation {
Copy link

Choose a reason for hiding this comment

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

Just throwing out some ideas:

I managed to make some changes to the Flink ClusterClient interface. This should make it easier to implement the methods of this: https://github.com/apache/flink/blob/10d52f268db3eda7ee1511ea30afb9a982644148/flink-clients/src/main/java/org/apache/flink/client/program/ClusterClient.java. Notable are:

  • submitJob(JobGraph, ClassLoader), which is non-blocking if you all setDetached(true) before
  • cancel(JobID)
  • getJobStatus(JobID)

A JobGraph will have a random JobID, you can get it from the JobGraph via getJobID(). For streaming you can get the JobGraph via StreamExecutionEnvironment.getStreamGraph().getJobGraph(). For batch it's a bit more involved but a starting point is this: https://github.com/apache/flink/blob/10d52f268db3eda7ee1511ea30afb9a982644148/flink-clients/src/main/java/org/apache/flink/client/program/ClusterClient.java#L890.

In general those APIs are somewhat internal and they are also somewhat interesting... 😉

@bsidhom
Copy link
Owner

bsidhom commented Mar 8, 2018

Please update and fix the merge conflict.

bsidhom pushed a commit that referenced this pull request Mar 15, 2018
Wrap all unknown coders in length-prefixed byte array coders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants