Skip to content

Add Lineage metrics to KafkaIO#32170

Merged
Abacn merged 2 commits intoapache:masterfrom
Abacn:lineagekafka
Aug 20, 2024
Merged

Add Lineage metrics to KafkaIO#32170
Abacn merged 2 commits intoapache:masterfrom
Abacn:lineagekafka

Conversation

@Abacn
Copy link
Copy Markdown
Contributor

@Abacn Abacn commented Aug 13, 2024

This PR depends on #32090

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@Abacn
Copy link
Copy Markdown
Contributor Author

Abacn commented Aug 14, 2024

R: @rohitsinha54 @ahmedabu98

@github-actions
Copy link
Copy Markdown
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@Abacn
Copy link
Copy Markdown
Contributor Author

Abacn commented Aug 16, 2024

R: @tvalentyn would you mind taking a review? Thanks!

@Abacn Abacn added this to the 2.59.0 Release milestone Aug 19, 2024
callback);

elementsWritten.inc();
if (!topicName.equals(reportedLineage)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are we adding this check do we expect to see more than one topic name or it is just to not redo this branch. If we expect more than one are they guaranteed to be appear in together?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes it is possible multiple topics appears in a KafkaWriter. This check reduces some overhead when there is single topic (e.g. set by spec), or there was a GBK upstream that led elements in same topic grouped together and will be processed together. This is the same pattern I used for PubSubIO sink Lineage in #32037 (See diff of PubsubUnboundedSink.java)

If we expect more than one are they guaranteed to be appear in together?

not necessary, depend on whether/how elements were grouped upstream, see above.

@Abacn Abacn merged commit 254519b into apache:master Aug 20, 2024
@Abacn Abacn deleted the lineagekafka branch August 20, 2024 19:30
reeba212 pushed a commit to reeba212/beam that referenced this pull request Dec 4, 2024
* Add Lineage metrics to KafkaIO

* Add asserts in tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants