Hi: I wanted to find if the metric reporter and registry are instantiated per task manager (which is a single JVM process) or per slot. I believe it per task manager (JVM process) but just wanted to confirm. Also, is there a way to access context information (eg: task manager name etc) in the metric reporter or registry just like in the rich function open method ? Thanks |
Hi
1) Yes, the metrics reporter was instantiated per task manager, you could refer to [1] to confirm.
2) You could get your runtime context by calling #getRuntimeContext() in RichFunction. And you could get your metric group within runtimeContext then. The task manager name could be found by #getAllVariables() within MetricGroup.
Best
Yun Tang
From: M Singh <[hidden email]>
Sent: Saturday, June 15, 2019 2:13 To: User Subject: Apache Flink - Question about metric registry and reporter and context information Hi:
I wanted to find if the metric reporter and registry are instantiated per task manager (which is a single JVM process) or per slot. I believe it per task manager (JVM process) but just wanted to confirm.
Also, is there a way to access context information (eg: task manager name etc) in the metric reporter or registry just like in the rich function open method ?
Thanks
|
You cannot access context information
in the metric reporter itself in a nice way. You can wait
for the first metric to be registered, and then extract arbitrary
metric variables from the metric group.
On 15/06/2019 19:31, Yun Tang wrote:
|
Free forum by Nabble | Edit this page |