-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-38762][runtime] Introduce SingleJobApplication #27362
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
base: master
Are you sure you want to change the base?
Conversation
f9f006f to
933fcc1
Compare
| .thenApply(ack -> streamGraph.getJobID()); | ||
| } | ||
|
|
||
| protected CompletableFuture<Acknowledge> internalSubmit( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be package private
|
|
||
| private void runRecoveredJob(final ExecutionPlan recoveredJob) { | ||
| private void runRecoveredJob( | ||
| final ExecutionPlan recoveredJob, final boolean wrapIntoApplication) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some comments to explain the behavior around with regard to wrapIntoApplication?
| executionPlan.getJobID())); | ||
| } | ||
|
|
||
| private Optional<AbstractApplication> getApplicationForJob(ExecutionPlan executionPlan) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this method should be used in internalSubmitJob?
| instanceof | ||
| FlinkJobNotFoundException) { | ||
| log.warn( | ||
| "Ignore job {} which may be expired when requesting application {}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's weird that a job is expired in the history while its hosting application is not expired.
| JobManagerJobMetricGroupFactory jobManagerJobMetricGroupFactory, | ||
| FatalErrorHandler fatalErrorHandler, | ||
| Collection<FailureEnricher> failureEnrichers, | ||
| JobStatusListener singleJobApplication, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
singleJobApplication -> jobStatusListener
The handler should simple treat it as a JobStatusListener instead of a SingleJobApplication.
| executionPlan.getApplicationId().map(applications::get); | ||
| if (optionalApplication.isPresent()) { | ||
| AbstractApplication application = optionalApplication.get(); | ||
| if (application instanceof JobStatusListener) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the clearer logic should be: if an application is a SingleJobApplication, it needs be passed to the jobManager as a JobStatusListener.
What is the purpose of the change
This pull request introduces SingleJobApplication that is used in session mode to run a single job in an application.
Brief change log
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (no)Documentation