Skip to content

Conversation

@kennknowles
Copy link
Member

@kennknowles kennknowles commented Jun 3, 2025

This is a preliminary change to reduce the number of files to review in #34902

When we introduce OutputBuilder, it will implement WindowedValue, and every time we create an OutputBuilder we will want to provide

  1. the default metadata for the output
  2. the receiver for the output

This change unblocks step 2 and reduces the size of the final change. The exact things done in this PR cause a lot of tiny changes but they are trivial:

  1. Move WindowedValue out of internal util package and into public values.
  2. Make WindowedValue an interface (it was an abstract class for obsolete reasons for Java < 8, and we want other interfaces to be able to extend it)
  3. WindowedValues companion class for concrete implementations and static methods (that already exist).
  4. Add WindowedValueReceiver and WindowedValueMultiReceiver in the SDK (previously they were in runners/core) and use them. This simplifies and eliminates a decent chunk of runner code.

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.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2025

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@kennknowles kennknowles force-pushed the ValueWithMetadataReceiver branch from fcc7095 to 1175409 Compare June 3, 2025 19:00
@kennknowles kennknowles force-pushed the ValueWithMetadataReceiver branch 2 times, most recently from dbf9ced to ca13974 Compare June 4, 2025 16:06
@kennknowles kennknowles force-pushed the ValueWithMetadataReceiver branch 2 times, most recently from f175dee to ebd6d09 Compare June 4, 2025 22:20
@kennknowles kennknowles changed the title Introduce ValueWithMetadata and its receivers Make WindowedValue a public interface, and receivers for it Jun 4, 2025
When we introduce OutputBuilder, it will implement WindowedValue,
and every time we create an OutputBuilder we will want to provide
the following:

1. the default metadata for the output
2. the receiver for the output

This change unblocks 2 and reduces the size of the final change.
@kennknowles kennknowles force-pushed the ValueWithMetadataReceiver branch from b7e7b0e to 6f56dbe Compare June 5, 2025 00:28
@github-actions github-actions bot removed the build label Jun 5, 2025
@kennknowles
Copy link
Member Author

Actually I think I can make it even simpler and one huge totally automated change that doesn't need much review and the semi-useful changes in a later PR.

@kennknowles kennknowles closed this Jun 5, 2025
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.

1 participant