[metrics] Add io-metrics for paimon in Flink
Purpose
- Monitor the input/output (IO) of Flink during read and write operations.
Tests
API and Format
Documentation
1、You add lots of metric, I suggest you sent the discuss email to [email protected] first. 2、modify the doc.
1、You add lots of metric, I suggest you sent the discuss email to [email protected] first. 2、modify the doc.
Roger that.
I'v done refactor for making with MetricRegistry public in https://github.com/apache/paimon/pull/5578
I'v done refactor for making with MetricRegistry public in #5578
rebase on this && add uts & all checks passed, cc~ @JingsongLi
Please only use
TableWrite.withMetricRegistryandTableRead.withMetricRegistry, do not introduce any API for metrics.And please make sure only io metric enabled, the file io can be
MetricsFileIO.
If we only use TableRead.withMetricRegistry, it would require too may modifications. However, in reality, we're always using and modifying the same AbstractFileStoreTable fileio reference. I've attempted to register metrics directly to the AbstractFileStoreTable within the ReadBuilder. This way, all subsequent operations like new scan, new streamscan, or new read can directly reuse the metrics collected by the AbstractFileStoreTable.
@JingsongLi Could you please take a look at this PR again for any remaining issues, thank ~