flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Davis <moda...@protonmail.com>
Subject Re: Run command after Batch is finished
Date Sat, 06 Jun 2020 12:14:30 GMT
Hi Jeff,

Thank you very much! That is exactly what I need.

Where the listener code will run in the cluster deployment(YARN, k8s)?
Will it be sent over the network?

Thank you!

  Mark

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, June 5, 2020 6:13 PM, Jeff Zhang <zjffdu@gmail.com> wrote:

> You can try JobListener which you can register to ExecutionEnvironment.
>
> https://github.com/apache/flink/blob/master/flink-core/src/main/java/org/apache/flink/core/execution/JobListener.java
>
> Mark Davis <modavis@protonmail.com> 于2020年6月6日周六 上午12:00写道:
>
>> Hi there,
>>
>> I am running a Batch job with several outputs.
>> Is there a way to run some code(e.g. release a distributed lock) after all outputs
are finished?
>>
>> Currently I do this in a try-finally block around ExecutionEnvironment.execute()
call, but I have to switch to the detached execution mode - in this mode the finally block
is never run.
>>
>> Thank you!
>>
>>   Mark
>
> --
> Best Regards
>
> Jeff Zhang
Mime
View raw message