Introduce OutputBuilder in Java SDK
With the addition of extended metadata for elements, we need to make code - especially user code - more robust to added metadata fields. This pull request adds OutputBuilder which should be used to builds new values, and builders should always be obtained by pulling metadata from some context (for example a currently-in-process element) when possible.
Concretely, this pull request
- Adds
OutputBuilderas a public interface extendingWindowedValue. - Adds
WindowedValues.builder(WindowedValueReceiver)to produce anOutputBuilderthat will output to the provider receiver.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] 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, commentfixes #<ISSUE NUMBER>instead. - [x] Update
CHANGES.mdwith noteworthy changes. - [x] 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)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.