-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BEAM-14464] More efficient grouping keys in precombiner table. #17641
Conversation
…owedValueCoder. The latter skips a whole bunch of checks to generate the correctly specialized WindowedValue type, especially for elements in the global window.
The current code constructs, hashes, and compares full WindowedValues for the grouping key, which ends up dominating the time spent in the combining table when using trivial combiners (like Sum.integers()). We only need compare the (structural value of the) key and windows, and can emit the windows in the global case. Per added microbenchmarks, this is roughly a 50% improvement for singly-windowed values, and roughly 2.5x improvement for the common GlobalWindows case.
R: @y1chi |
I have been looking for someone to review #17327, do you mind if we get that merged first and then take on this change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks, Yichi! As mentioned, I'm going to hold off merging this until that other PR goes in. |
The other PR is merged. Could this be merged? |
Failures org.apache.beam.sdk.io.aws2.kinesis.KinesisIOWriteTest.testWriteFailure look unrelated. |
Run Java PreCommit |
precommit is broken again due to checkStyle warnings |
Sure, we can hold off on this until that is in to avoid conflicts.
…On Thu, May 12, 2022 at 12:02 PM Lukasz Cwik ***@***.***> wrote:
I have been looking for someone to review #17327, do you mind if we get that merged first and then take on this change?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
The current code constructs, hashes, and compares full WindowedValues
for the grouping key, which ends up dominating the time spent in the
combining table when using trivial combiners (like Sum.integers()).
We only need compare the (structural value of the) key and windows,
and can emit the windows in the global case.
Per added microbenchmarks, this is roughly a 50% improvement for
singly-windowed values, and roughly 2.5x improvement for the common
GlobalWindows case.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with 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.