AHeise commented on a change in pull request #19060:
URL: https://github.com/apache/flink/pull/19060#discussion_r825800063



##########
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:
       You actually made it 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]


Reply via email to