dmvk commented on a change in pull request #18416:
URL: https://github.com/apache/flink/pull/18416#discussion_r789487585
##########
File path:
flink-clients/src/main/java/org/apache/flink/client/deployment/application/ApplicationDispatcherBootstrap.java
##########
@@ -266,10 +271,22 @@ private void runApplicationEntryPoint(
final Set<JobID> tolerateMissingResult,
final DispatcherGateway dispatcherGateway,
final ScheduledExecutor scheduledExecutor,
- final boolean enforceSingleJobExecution) {
+ final boolean enforceSingleJobExecution,
+ final boolean submitFailedJobOnApplicationError) {
+ if (submitFailedJobOnApplicationError && !enforceSingleJobExecution) {
+ dispatcherGateway.submitFailedJob(
+ ZERO_JOB_ID,
+ FAILED_JOB_NAME,
+ new IllegalStateException(
+ String.format(
+ "Submission of failed job in case of an
application error ('%s') is not supported in non-HA setups.",
Review comment:
> If the job had run the job ID would be random as well, right? Couldn't
we use that then?
For this to be useful, the user should know the jobId upfront (that's one of
the reasons for supporting the single execution mode only). Also this is not
really an exception from the "application driver", but just an unsupported
combination of configurations.
I think the current approach should be sufficient for now (failing the whole
dispatcher bootstrap). Also it's an experimental feature, so we can reiterate
on this later if we find this confusing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]