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


##########
flink-end-to-end-tests/test-scripts/test_ha_per_job_cluster_datastream.sh:
##########
@@ -126,6 +125,8 @@ function run_ha_test() {
     local neededTaskmanagers=$(( (${PARALLELISM} + ${TASK_SLOTS_PER_TM_HA} - 
1)  / ${TASK_SLOTS_PER_TM_HA} ))
     start_taskmanagers ${neededTaskmanagers}
 
+    wait_num_of_occurence_in_logs "Job .* is submitted." 1 "standalonejob"
+    JOB_ID=$(grep -o "Job .* is submitted." 
$FLINK_LOG_DIR/*standalonejob*.log* | sed 's/Job \(.*\) is submitted./\1/g')

Review Comment:
   I would like to use the following script to get the job id.
   
   `JOB_ID=$(grep -E -o 'Job [a-z0-9]+ is submitted' 
$FLINK_LOG_DIR/*standalonejob*.log* | awk '{print $2}')`



##########
flink-clients/src/main/java/org/apache/flink/client/deployment/application/cli/ApplicationClusterDeployer.java:
##########
@@ -57,6 +60,16 @@ public <ClusterID> void run(
 
         LOG.info("Submitting application in 'Application Mode'.");
 
+        // 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(configuration)

Review Comment:
   Given that we just want a stable and unique job id for every Flink 
application, maybe we could also generate the job id based on 
`high-availability.cluster-id`.
   
   And this could happen in the `ApplicationDispatcherBootstrap` of JobManager, 
not the client side.



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