StephanEwen commented on pull request #13920:
URL: https://github.com/apache/flink/pull/13920#issuecomment-723218943


   The PR adds a new `numBytesIn` metric to the `OperatorIOMetricGroup`. That 
means all operators now show that metric. But the metric is zero for the 
majority of operators (all except for sources), because all other operators 
never receive bytes (just records).
   I think that is an issue.
   
   An idea would be investigate the following approach:
     - Define a `SourceMetricGroup` interface that extends `MetricGroup` and 
has the additional methods for pre-defined metrics (`getNumRecordsIn()`, ...). 
That would also make the `SourceContext` interface a bit nicer, because all 
metric-related methods are in the metrics group. We don't need to extend the 
`SourceContext` interface each time a new pre-defined metric gets added.
   
     - Implement a `SourceMetricGroupImpl` that reuses some metrics (counters / 
Gauges) from the `OperatorIOMetricGroup` (the `numRecordsIn`) and some metrics 
from the `TaskIOMetricGroup` (the `numBytesIn` metrics). That way the source's 
`numBytesIn` contribute to the tasks's `numBytesIn` and are also displayed in 
the web UI main job overview.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to