What you're describing is not possible.  There is no runtime context or
metrics you can use at that point.

The best you can probably do (at least for start time) is just keep a flag
in your function and log a metric once and only once when it first starts
executing.

On Wed, Nov 21, 2018 at 5:18 AM bastien dine <bastien.d...@gmail.com> wrote:

> Hello all,
>
> I am using metric to count some sutff in my topology, this is pretty easy
> with the metric API in getRuntimeContext in a Rich function
> However I would like to use this metric API to log start date & end date
> of my processing, but in the source code executed on the job manager (i.e
> not in a operator) before & after the env.execute..
> How can i retrieve the runtime context, from the execution env maybe ?
>
> Regards,
> Bastien
>
> ------------------
>
> Bastien DINE
> Data Architect / Software Engineer / Sysadmin
> bastiendine.io
>

Reply via email to