简体   繁体   English

Flink webUI 中的“无指标”

[英]"No Metrics " in Flink webUI

I started a local flink server (./bin/start-cluster.sh), and submitted a job.我启动了一个本地 flink 服务器(./bin/start-cluster.sh),并提交了一个作业。 I have the following code to define a custom metric:我有以下代码来定义自定义指标:

.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 "No metrics"但是当我运行作业并发送一些数据时,我在 flink Web UI 中看不到任何指标,只有“没有指标”

在此处输入图片说明

I had configured the JMX reporter in the flink-conf.yaml.我已经在 flink-conf.yaml 中配置了 JMX 报告器。 I am not sure how could I get the metrics shown on the dashboard?我不确定如何获得仪表板上显示的指标?

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.我使用 docker-swarm 来部署 flink 集群。

This is my question Flink 1.7.0 Dashboard not show Task Statistics这是我的问题Flink 1.7.0 Dashboard not show Task Statistics

I was talking about the task statistics, but the taskmetrics was wrong too我说的是任务统计,但任务指标也错了

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM