Add outputWindowedValue capability to Java SDK#29616
Add outputWindowedValue capability to Java SDK#29616kennknowles merged 1 commit intoapache:masterfrom
Conversation
7ac9ce9 to
2c5e7fd
Compare
|
R: @robertwb |
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
c25575f to
087382e
Compare
|
R: @johnjcasey since you also already took a look earlier |
johnjcasey
left a comment
There was a problem hiding this comment.
LGTM, just some small comments.
I'm far from expert on the FnApiDoFnRunner, so you may want another set of eyes there
There was a problem hiding this comment.
looks like some typos in the docstring
There was a problem hiding this comment.
Ah yes. Copy/paste/forget of course :-)
Thanks!
There was a problem hiding this comment.
Unrelated to this pr, but this coder lookup pattern might be useful to extract to a utility
There was a problem hiding this comment.
Yea, I need to see about this. I am actually the original author of the "infer coder from raw values" logic back in the day. It has been improved and also had the schema stuff added so I don't 100% know how best to generalize.
Also I noticed in building this that window types are not in the registry, because WindowFn already tells the pipeline what coder to use. Probably not a big deal since it never mattered until this PR.
There was a problem hiding this comment.
Is validity jus that the timestamp is in the window?
There was a problem hiding this comment.
TBH I just copy/pasted the comment. Filed #29637 and linked it to each of the TODOs.
087382e to
41690b5
Compare
kennknowles
left a comment
There was a problem hiding this comment.
Thanks for the excellent eye for detail.
There was a problem hiding this comment.
Ah yes. Copy/paste/forget of course :-)
Thanks!
There was a problem hiding this comment.
Yea, I need to see about this. I am actually the original author of the "infer coder from raw values" logic back in the day. It has been improved and also had the schema stuff added so I don't 100% know how best to generalize.
Also I noticed in building this that window types are not in the registry, because WindowFn already tells the pipeline what coder to use. Probably not a big deal since it never mattered until this PR.
There was a problem hiding this comment.
TBH I just copy/pasted the comment. Filed #29637 and linked it to each of the TODOs.
39023cd to
a75e53a
Compare
a75e53a to
db0bb44
Compare
|
Rebased to get test fixes but actually if we read configuration from |
| * <p><i>Note:</i> A splittable {@link DoFn} is not allowed to output from {@link StartBundle} | ||
| * or {@link FinishBundle} methods. | ||
| */ | ||
| public abstract void outputWindowedValue( |
There was a problem hiding this comment.
This new abstract method introduces a breaking change in Beam 2.54.0 for classes implemented OutputReceiver
|
|
||
| void outputWithTimestamp(T output, Instant timestamp); | ||
|
|
||
| void outputWindowedValue( |
This adds the ability (which we don't expect to use much, and not really at all from users) to output a full windowed value. This allows a proper implementation of Reshuffle in the SDK and could be useful in some other testing scenarios.
Pulling this off #28853 for simpler review while working out final issues there.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
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.CHANGES.mdwith noteworthy changes.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.