简体   繁体   English

Flink web UI:监控指标不起作用

[英]Flink web UI: Monitor Metrics doesn't work

run with flink-1.9.0 on yarn(2.6.0-cdh5.11.1), but the flink web ui metrics does'nt work, as shown below:在 yarn(2.6.0-cdh5.11.1) 上使用 flink-1.9.0 运行,但 flink web ui 指标不起作用,如下所示:

这里

I guess you are looking at the wrong metrics.我猜你正在查看错误的指标。 Due no data flows from one task to another (you can see only one box at the UI) there is nothing to show.由于没有数据从一项任务流向另一项任务(您只能在 UI 上看到一个框),因此没有可显示的内容。 The metrics you are looking at only show the data which flows from one flink task to another.您正在查看的指标仅显示从一个 flink 任务流向另一个任务的数据。 At your example everything happens within this task.在您的示例中,一切都发生在此任务中。

Look at this example:看这个例子:

地图操作

You can see two tasks sending data to the map-task which emits this data to another task.您可以看到两个任务向 map-task 发送数据,该任务将该数据发送给另一个任务。 Therefore you see incoming and outgoing data.因此,您会看到传入和传出的数据。

But on the other hand a source task never has incoming data(I must admit that this is confusing at the first look):但另一方面,源任务从来没有传入数据(我必须承认,这乍一看令人困惑):

源任务

The number of records recieved is 0 but it send a couple of records to the downstream task.收到的记录数为 0,但它向下游任务发送了几条记录。

Back to your problem: What you can do is have a look at the operator metrics.回到您的问题:您可以做的是查看运营商指标。 If you look at the metrics tab (the one at the very right) you can select beside the task metrics also some operator metrics.如果您查看指标选项卡(最右侧的那个),您可以在任务指标旁边的 select 以及一些操作员指标。 These metrics have a name like 0.Map.numRecordsIn .这些指标的名称类似于0.Map.numRecordsIn

The name assembles like this <slot>.<operatorName>.<metricsname> .该名称的组合如下<slot>.<operatorName>.<metricsname> But be aware that this metrics are not recorded, you don't have any historic data and once you leave this tab or remove a metric the data collected until that point are gone.但请注意,此指标不会被记录,您没有任何历史数据,一旦您离开此选项卡或删除指标,在该点之前收集的数据就会消失。 I would recommend to use a proper metrics backend like influx, prometheus or graphite.我建议使用适当的指标后端,如 influx、prometheus 或石墨。 You can find a description at the flink docs .你可以在flink docs找到描述。

Hope that helped.希望有帮助。

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

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