简体   繁体   English

cloudwatch 中的 KDA 指标与 Flink 指标不同

[英]KDA metrics in cloudwatch different from Flink metrics

I have a Flink application deployed on AWS Kinesis Data Analytics.我在 AWS Kinesis Data Analytics 上部署了一个 Flink 应用程序。 My current setting is:我当前的设置是:

Parallelism=128
Parallelism per KPU=4

The issue I have is, there is a big difference between the counts shown on the Flink web UI vs the Count shown in Cloudwatch even for Metrics that come out of the box.我遇到的问题是,Flink web UI 上显示的计数与 Cloudwatch 中显示的计数之间存在很大差异,即使是开箱即用的指标也是如此。

Example:例子:

Counts from Flink UI:来自 Flink UI 的计数:

Records Sent: Close to 1 Billion发送的记录:接近 10 亿在此处输入图像描述

Count from Cloudwatch:从 Cloudwatch 统计:

NumRecordsIn: NumRecordsIn:

在此处输入图像描述

NumRecordsOut: NumRecordsOut: 在此处输入图像描述

Both of these are close to 10.8Million.这两个都接近1080万。

The metrics for KDA are configured at Task level. KDA 的指标在Task级别配置。

I am wondering why I am seeing this huge discrepancy.我想知道为什么我会看到这种巨大的差异。 Is the parallelism having some effect on the counts?并行性对计数有影响吗?

FWIW, I added a custom metric which tracks the numRecordsIn. FWIW,我添加了一个跟踪 numRecordsIn 的自定义指标。 That also seems to be similar to the out of the box NumRecordsIn metric.这似乎也类似于开箱即用的 NumRecordsIn 指标。

It appears that you are comparing the total numRecordsIn/Out across the lifetime of the job (roughly 1 billion) to the maximum ever seen in one minute (around 10 million).看来您正在将作业生命周期内的总 numRecordsIn/Out 数(大约 10 亿次)与一分钟内出现的最大值(大约 1000 万次)进行比较。

What David has mentioned above is correct. David 上面提到的是正确的。 I was finally able to find out how to get the values from Flink UI on to CloudWatch.我终于能够找到如何将值从 Flink UI 获取到 CloudWatch。 The problem with CloudWatch is that, it does not include the parallelism. CloudWatch 的问题在于,它不包括并行性。 So in order to get the count of records emitted by a specific task, take the Average(numRecordsOut) of that task and multiply it by parallelism.因此,为了获得特定任务发出的记录数,请取该任务的 Average(numRecordsOut) 并将其乘以并行度。

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

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