[ 
https://issues.apache.org/jira/browse/FLINK-22438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17332080#comment-17332080
 ] 

Zhengqi Zhang commented on FLINK-22438:
---------------------------------------

[~knaufk] In Flink 1.9,there is no problem with AsyncIO's numRecordsOut metric, 
and it use the wrapping output class CountingOutput.After Flink 1.10,because 
the new code is submitted, the class AsyncWaitOperator directly uses the output 
parameter passed in the Setup method to construct a TimestampedCollector 
instance, but the original output field does not manage the NumRecordsOut 
Metric.

The output field is only used in the TimestampedCollector. CountingOutput 
proxies the output field and adds the NumRecordsOut metric, A call to output in 
a TimestampedCollector will take effect through a method with the same name as 
countingOutput.

So it seems that our use of CountingOutput to construct a TimestampedCollector 
will not affect the existing code.

> add numRecordsOut metric for Async IO
> -------------------------------------
>
>                 Key: FLINK-22438
>                 URL: https://issues.apache.org/jira/browse/FLINK-22438
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Metrics
>    Affects Versions: 1.11.3, 1.12.2, 1.13.0
>            Reporter: Zhengqi Zhang
>            Priority: Major
>         Attachments: QQ截图20210424004201.png
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> In Flink WebUI,there is no numRecordsOut metric,and the class 
> AsyncWaitOperator did't have this metric in fact.Other operators have this 
> metric, which makes it difficult to monitor Async IO operator and can cause 
> confusion for users.
> I think we can directly  use the wrapping output class CountingOutput to 
> update numRecordsOut metric.CountingOutput is used in super class of 
> AsyncWaitOperator(AbstractStreamOperator).
> Here is my commit,And I have run a test, it work.
> [my  
> commit|https://github.com/onyourhead/flink/commit/58a8ac27b292280696639caa2e311637cd631a00]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to