“无指标"在Flink webUI中 [英] "No Metrics " in Flink webUI
问题描述
我启动了本地flink服务器(./bin/start-cluster.sh),并提交了一份工作.我有以下代码来定义自定义指标:
I started a local flink server (./bin/start-cluster.sh), and submitted a job. 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;
}
})
但是当我运行作业并发送一些数据时,我无法在flink Web UI中看到任何指标,只是没有指标"
But when I run the job and send some data, I cannot see any metrics in flink web UI, just "No metrics"
我已经在flink-conf.yaml中配置了JMX报告程序.我不确定如何获得仪表板上显示的指标?
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?
推荐答案
我遇到了同样的问题.我的问题是在群集配置中,我使用主机名来命名任务管理器,并且当我更改它(使用默认名称)时,任务指标开始起作用. 我使用docker-swarm部署flink集群.
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.
这是我的问题 Flink 1.7.0仪表板未显示任务统计信息
我在谈论任务统计信息,但是任务度量标准也是错误的
I was talking about the task statistics, but the taskmetrics was wrong too
这篇关于“无指标"在Flink webUI中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!