Hi,
I'm trying to config Flink running in Kubernetes native to push some metrics to NewRelic (using a custom ScheduledDropwizardReporter). From the logs, I could see that an instance of ScheduledDropwizardReporter has already been created successfully (the overridden getReporter() method <https://github.com/apache/flink/blob/e346215edcf2252cc60c5cef507ea77ce2ac9aca/flink-metrics/flink-metrics-dropwizard/src/main/java/org/apache/flink/dropwizard/ScheduledDropwizardReporter.java#L234> was called). An instance of MetricRegistryImpl <https://github.com/apache/flink/blob/e346215edcf2252cc60c5cef507ea77ce2ac9aca/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java#L141> also created successfully (this log was shown: /Periodically reporting metrics in intervals of 30 SECONDS for reporter my_newrelic_reporter/) However, the report() method <https://github.com/apache/flink/blob/e346215edcf2252cc60c5cef507ea77ce2ac9aca/flink-metrics/flink-metrics-core/src/main/java/org/apache/flink/metrics/reporter/Scheduled.java#L30> was not called. When running on my laptop, there's no issue at all. Are there any special things that I need to care for when running in Kubernetes? Thanks a lot. Regards, Averell -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/ |
Hi Averell,
If you are seeing the log message from [1] and Scheduled#report() is not called, the thread in the "Flink-MetricRegistry" thread pool might be blocked. You can use the jstack utility to see on which task the thread pool is blocked. Best, Gary [1] https://github.com/apache/flink/blob/e346215edcf2252cc60c5cef507ea77ce2ac9aca/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java#L141 On Tue, May 12, 2020 at 4:32 PM Averell <[hidden email]> wrote: > > Hi, > > I'm trying to config Flink running in Kubernetes native to push some metrics > to NewRelic (using a custom ScheduledDropwizardReporter). > > From the logs, I could see that an instance of ScheduledDropwizardReporter > has already been created successfully (the overridden getReporter() method > <https://github.com/apache/flink/blob/e346215edcf2252cc60c5cef507ea77ce2ac9aca/flink-metrics/flink-metrics-dropwizard/src/main/java/org/apache/flink/dropwizard/ScheduledDropwizardReporter.java#L234> > was called). > An instance of MetricRegistryImpl > <https://github.com/apache/flink/blob/e346215edcf2252cc60c5cef507ea77ce2ac9aca/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java#L141> > also created successfully (this log was shown: /Periodically reporting > metrics in intervals of 30 SECONDS for reporter my_newrelic_reporter/) > > However, the report() method > <https://github.com/apache/flink/blob/e346215edcf2252cc60c5cef507ea77ce2ac9aca/flink-metrics/flink-metrics-core/src/main/java/org/apache/flink/metrics/reporter/Scheduled.java#L30> > was not called. > > When running on my laptop, there's no issue at all. > Are there any special things that I need to care for when running in > Kubernetes? > > Thanks a lot. > > Regards, > Averell > > > > > > -- > Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/ |
Hi Gary,
Thanks for the help. Here below is the output from jstack. It seems not being blocked. In my JobManager log, there's this WARN, I am not sure whether it's relevant at all. Attached is the full jstack dump k8xDump.txt <http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/file/t1586/k8xDump.txt> . Thanks and regards, Averell -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/ |
Hi Gary,
Sorry for the false alarm. It's caused by a bug in my deployment - no metrics were added into the registry. Sorry for wasting your time. Thanks and best regards, Averell -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/ |
Free forum by Nabble | Edit this page |