flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Caizhi Weng <tsreape...@gmail.com>
Subject What's the best practice to determine whether a job has finished or not?
Date Fri, 08 May 2020 06:47:28 GMT
Hi dear Flink community,

I would like to determine whether a job has finished (no matter
successfully or exceptionally) in my code.

I used to think that JobClient#getJobStatus is a good idea, but I found
that it behaves quite differently under different executing environments.
For example, under a standalone session cluster it will return the FINISHED
status for a finished job, while under a yarn per job cluster it will throw
a ApplicationNotFound exception. I'm afraid that there might be other
behaviors for other environments.

So what's the best practice to determine whether a job has finished or not?
Note that I'm not waiting for the job to finish. If the job hasn't finished
I would like to know it and do something else.

Mime
View raw message