Skip to content

Conversation

schnappi17
Copy link
Contributor

Purpose

Linked issue: close #1737

Update counter when commit with committables, the value is the size of data files. The counter metric is already registered by flink.

for (CommitMessage commitMessage : commitMessages) {
long dataFileSizeInc =
((CommitMessageImpl) commitMessage)
.newFilesIncrement().newFiles().stream()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compact files and changelogs should also be calculated.

throws IOException, InterruptedException {
metricGroup.getNumBytesOutCounter().inc(calcDataBytesSend(committables));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Count this only after the commit is successful. Otherwise if the commit is retried through fail over, this will be counted multiple times.

@tsreaper tsreaper merged commit 8418e15 into apache:master Aug 9, 2023
schnappi17 added a commit to schnappi17/flink-table-store that referenced this pull request Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Support numBytesSend metric for paimon sink
2 participants