flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dian Fu <dian0511...@gmail.com>
Subject Re: How to prevent from launching 2 jobs at the same time
Date Mon, 23 Sep 2019 02:55:14 GMT
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.


[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
> 在 2019年9月23日,上午4:57,David Morin <morin.david.bzh@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

View raw message