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/06/22 09:56:27 UTC

[GitHub] [flink] KarmaGYZ commented on a diff in pull request #20042: [FLINK-19358][runtime] Make the job id distinct in application mode w…

KarmaGYZ commented on code in PR #20042:
URL: https://github.com/apache/flink/pull/20042#discussion_r903535308


##########
flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java:
##########
@@ -208,6 +210,16 @@ protected void runApplication(String[] args) throws Exception {
                             Collections.singletonList(uri.toString()));
         }
 
+        // In HA mode, we only support single-execute jobs at the moment. Here, we manually
+        // generate the job id, if not configured, to keep it consistent across failover.
+        if (HighAvailabilityMode.isHighAvailabilityModeActivated(effectiveConfiguration)
+                && !effectiveConfiguration
+                        .getOptional(PipelineOptionsInternal.PIPELINE_FIXED_JOB_ID)
+                        .isPresent()) {
+            effectiveConfiguration.set(
+                    PipelineOptionsInternal.PIPELINE_FIXED_JOB_ID, new JobID().toHexString());
+        }
+

Review Comment:
   TBH, I also hesitated between these two places. It seems all the configuration adjustments happen in `CliFrontend`. And we will have to do the deduplication once we introduce another implementation of `ApplicationDeployer`.
   I don't have a strong opinion on it, though. WDYT @wangyang0918 ?



-- 
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