JingGe commented on a change in pull request #19060:
URL: https://github.com/apache/flink/pull/19060#discussion_r825714830
##########
File path:
flink-tests/src/test/java/org/apache/flink/test/streaming/runtime/SinkMetricsITCase.java
##########
@@ -130,8 +132,10 @@ private void assertSinkMetrics(
int subtaskWithMetrics = 0;
for (OperatorMetricGroup group : groups) {
Map<String, Metric> metrics = reporter.getMetricsByGroup(group);
- // there are only 2 splits assigned; so two groups will not update
metrics
- if (group.getIOMetricGroup().getNumRecordsOutCounter().getCount()
!= 0) {
+ // There are only 2 splits assigned; so two groups will not update
metrics.
+ // There is no other way to access the counter via
OperatorMetricGroup, we have to use
+ // metrics from the reporter.
+ if (((Counter)
metrics.get(MetricNames.NUM_RECORDS_SEND)).getCount() == 0) {
Review comment:
Could you explain what does "consistent" mean in this case? The
`numRecordsOutCounter` is defined in the `OperatorIOMetricGroup` and the
`numRecordsSendCounter` is in the `SinkWriterMetricGroup`. Since they are on
different abstraction levels and there is no way to access the
`numRecordsSendCounter` from `OperatorMetricGroup`, how could they be
consistent?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]