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


##########
flink-container/src/main/java/org/apache/flink/container/entrypoint/StandaloneApplicationClusterEntryPoint.java:
##########
@@ -114,7 +117,18 @@ private static PackagedProgram getPackagedProgram(
     private static void setStaticJobId(
             StandaloneApplicationClusterConfiguration clusterConfiguration,
             Configuration configuration) {
-        final JobID jobId = clusterConfiguration.getJobId();
+        JobID jobId = clusterConfiguration.getJobId();
+
+        if 
(HighAvailabilityMode.isHighAvailabilityModeActivated(configuration) && jobId 
== null) {
+            jobId =
+                    new JobID(
+                            Preconditions.checkNotNull(
+                                            configuration.get(
+                                                    
HighAvailabilityOptions.HA_CLUSTER_ID))
+                                    .hashCode(),
+                            0);
+        }

Review Comment:
   Minor: I'd suggest to explain this logic a bit in comments.



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