“No Metrics ” in Flink webUI

被刻印的时光 ゝ 提交于 2019-12-11 14:26:07

问题


I started a local flink server (./bin/start-cluster.sh), and submit a job. I have the following code to define an metrics.

.map(new RichMapFunction<String, String>() {
        private transient Counter counter;

        @Override
        public void open(Configuration config) {
            this.counter = getRuntimeContext()
                    .getMetricGroup()
                    .counter("myCounter");
        }

        @Override
        public String map(String value) throws Exception {
            this.counter.inc();
            return value;
        }
    })

but when I run the job and send some data, I cannot see any metrics in flink web UI, just so "No metrics"

I had configured the JMX reporter in the flink-conf.yaml. I am not sure how could I get the metrics shown on the dashboard?


回答1:


I had the same problem. My problem was in cluster configuration, I was using the hostname to name the taskmanager, and when I change it (using the default name) , the task metrics start to work. I use docker-swarm to deploy the flink cluster.

This is my question Flink 1.7.0 Dashboard not show Task Statistics

I was talking about the task statistics, but the taskmetrics was wrong too



来源:https://stackoverflow.com/questions/56235219/no-metrics-in-flink-webui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!