Do Flink metrics survive a shutdown?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Do Flink metrics survive a shutdown?

Sameer Wadkar
I want to use Flink metrics API to store user defined metrics (counters). I instantiate the MetricsGroup in the open() function of the RichMapFunction and increment the counters which are created within the metrics group.

If the job restarts on failure, will the counters get restored from state?

Thanks,
Sameer
Reply | Threaded
Open this post in threaded view
|

Re: Do Flink metrics survive a shutdown?

Chesnay Schepler
No. You have to checkpoint and restore the value yourself.

On 09.05.2018 19:52, Sameer W wrote:
> I want to use Flink metrics API to store user defined metrics
> (counters). I instantiate the MetricsGroup in the open() function of
> the RichMapFunction and increment the counters which are created
> within the metrics group.
>
> If the job restarts on failure, will the counters get restored from state?
>
> Thanks,
> Sameer