You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/01/20 16:12:10 UTC

[GitHub] [flink] dmvk commented on a change in pull request #18416: [FLINK-25715][clients] Add deployment option (`execution.submit-failed-job-on-application-error`) for submitting a failed job when there is an error in application driver.

dmvk commented on a change in pull request #18416:
URL: https://github.com/apache/flink/pull/18416#discussion_r788920768



##########
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:
       The main reason was not having to think about scenarios when the driver can actually submit more than one job.
   
   For example:
   - If the exception happens between first and second submission (first one has already completed). What job id do we submit the job with?
   - Choosing the submission id is tricky here in general, as we can't really use the `$internal.pipeline.job-id` (which implies the "single job mode")
   
   Any thoughts on this?




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org