-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Encode paneinfo with PaneInfoCoder. #34824
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
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,7 @@ def MakeXyzs(v): | |
|
||
from apache_beam.coders import coders | ||
from apache_beam.typehints import typehints | ||
from apache_beam.utils import windowed_value | ||
|
||
__all__ = ['registry'] | ||
|
||
|
@@ -92,6 +93,7 @@ def register_standard_coders(self, fallback_coder): | |
self._register_coder_internal(bytes, coders.BytesCoder) | ||
self._register_coder_internal(bool, coders.BooleanCoder) | ||
self._register_coder_internal(str, coders.StrUtf8Coder) | ||
self._register_coder_internal(windowed_value.PaneInfo, coders.PaneInfoCoder) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fix has a large blast radius. It changed registered standard coders which is default behavior globally. Shall we do this or just put a coder implementation in new ReShuffle? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you suggesting to define PaneInfoCoder here and then useCoderRegistry.register_coder ?
I don't have strong opinion, is there a disadvantage to doing it here? It seems like an 'internal' coder use case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kennknowles What do you think about this? We should use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This introduces a breaking change such that windowed_value.PaneInfo has changed default coder. This is not limited to ReShuffle but also user pipeline. Since test results shows PaneInfoCoder is much more efficient than FastPrimitiveCoder for PaneInfo, I am fine with the change, just need to know this is another breaking change introduced in 2.65.0 If we keep this change I recommend to also mention this in https://github.com/apache/beam/blob/master/CHANGES.md#breaking-changes-1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, we should update https://github.com/apache/beam/blob/master/CHANGES.md#breaking-changes-1 at least. |
||
self._register_coder_internal(typehints.TupleConstraint, coders.TupleCoder) | ||
self._register_coder_internal(typehints.DictConstraint, coders.MapCoder) | ||
self._register_coder_internal( | ||
|
Uh oh!
There was an error while loading. Please reload this page.