zhuzhurk commented on code in PR #27765:
URL: https://github.com/apache/flink/pull/27765#discussion_r2992212893


##########
flink-clients/src/main/java/org/apache/flink/client/deployment/application/PackagedProgramApplication.java:
##########
@@ -192,8 +201,9 @@ public PackagedProgramApplication(
         this.recoveredJobInfos = checkNotNull(recoveredJobInfos);
         this.recoveredTerminalJobInfos = 
checkNotNull(recoveredTerminalJobInfos);
         this.configuration = checkNotNull(configuration);
+        this.jobCountLimit = jobCountLimit;
+        this.streamingJobCountLimit = streamingJobCountLimit;

Review Comment:
   It's better to check that these limits are at least 1.



##########
flink-clients/src/main/java/org/apache/flink/client/deployment/application/ApplicationJobUtils.java:
##########
@@ -125,10 +127,24 @@ private static String checkClusterId(String str) {
         return str;
     }
 
-    public static boolean allowExecuteMultipleJobs(Configuration config) {
-        final Optional<String> configuredJobId =
-                
config.getOptional(PipelineOptionsInternal.PIPELINE_FIXED_JOB_ID);
-        return !HighAvailabilityMode.isHighAvailabilityModeActivated(config)
-                && configuredJobId.isEmpty();
+    /**
+     * Returns the job count limits for the given configuration.
+     *
+     * @param config The configuration to get the job count limits from
+     * @return A tuple of (total job count limit, streaming job count limit)
+     */
+    public static Tuple2<Integer, Integer> getJobCountLimits(Configuration 
config) {
+        if 
(config.get(DeploymentOptions.SUBMIT_FAILED_JOB_ON_APPLICATION_ERROR)) {
+            // enforce single job execution

Review Comment:
   Could you add some explanation for this decision, just like the explanation 
in the FLIP.



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

Reply via email to