Hi David,

The jobs are identified by job id, not by job name internally in Flink and so 
It will only check if there are two jobs with the same job id. 

If you submit the job via CLI[1], I'm afraid there are still no built-in ways 
provided as currently the job id is generated randomly when submitting a job 
via CLI and the generated job id has nothing to do with the job name. 
However, if you submit the job via REST API [2], it did provide an option to 
specify the job id when submitting a job. You can generate the job id by 
yourself.

Regards,
Dian

[1] https://ci.apache.org/projects/flink/flink-docs-master/ops/cli.html 
<https://ci.apache.org/projects/flink/flink-docs-master/ops/cli.html>
[2] 
https://ci.apache.org/projects/flink/flink-docs-master/monitoring/rest_api.html#jars-jarid-run
 
<https://ci.apache.org/projects/flink/flink-docs-master/monitoring/rest_api.html#jars-jarid-run>
> 在 2019年9月23日,上午4:57,David Morin <morin.david....@gmail.com> 写道:
> 
> Hi,
> 
> What is the best way to prevent from launching 2 jobs with the same name 
> concurrently ?
> Instead of doing a check in the script that starts the Flink job, I would 
> prefer to stop a job if another one with the same name is in progress 
> (Exception or something like that).
> 
> David

Reply via email to