Uh oh!
There was an error while loading. Please reload this page.
[BEAM-8388] Make sdk-java-core compatible with avro 1.8 & 1.9 - #16271
[BEAM-8388] Make sdk-java-core compatible with avro 1.8 & 1.9#16271RustedBones wants to merge 2 commits into
Conversation
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
This is a breaking change. The class needs to be propagated for proper factories instanciation.
There was a problem hiding this comment.
Can you make it into two codepaths? I am just coming to this PR to help out a little so I don't have all the history of your thoughts on this.
There was a problem hiding this comment.
I guess it was a question if we can avoid breaking changes here, isn't it?
There was a problem hiding this comment.
This is a breaking change. It aligns better with the Source implementation.
There was a problem hiding this comment.
Can you make this also a separate code path?
RustedBones
commented
Dec 17, 2021
aromanenko-dev
commented
Dec 20, 2021
Thanks! I'm a bit busy with other PRs for the moment but I'll try to take a look on this in the next days. CC: @RyanSkraba@iemejia fyi, if you have some time, ptal too |
aromanenko-dev
commented
Dec 27, 2021
@RustedBones Sorry, I still didn't have a time for review but did you check a failed test? Is it related to your changes? |
RustedBones
commented
Jan 3, 2022
@aromanenko-dev yes, this is related to my changes. It has some impact on the readAvrosWithBeamSchema. To me, the only way to properly enable logical-type support with avro reflect classes is to create an |
aromanenko-dev
commented
Jan 4, 2022
CC: @kennknowles@lukecwik@TheNeuralBit |
TheNeuralBit
commented
Jan 5, 2022
Is it making breaking changes to |
RustedBones
commented
Jan 7, 2022
There are no breaking changes to the The breaking changes are:
Maybe we should do as for the |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Can you make it into two codepaths? I am just coming to this PR to help out a little so I don't have all the history of your thoughts on this.
There was a problem hiding this comment.
Can you make this also a separate code path?
There was a problem hiding this comment.
nit: a class is slightly different from a type (types have generics and constraints, etc, etc) so prefer some identifier like elementClass or clazz
There was a problem hiding this comment.
I know but this has been called 'type' everywhere in the Avro section (AvroCoder & AvroWriter and AvroSource.Mode). I'm just keeping the consistency
448c998 to
548183cCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
aaltay
commented
Jan 27, 2022
What is the next step on this PR? |
RustedBones
commented
Jan 31, 2022
On my side, I'd say the PR is ready and addresses the main pain points.
|
RustedBones
commented
Mar 2, 2022
Any plans on how to proceed with this ? |
aaltay
commented
Mar 2, 2022
pinging @kennknowles for the above question. |
aromanenko-dev
left a comment
There was a problem hiding this comment.
@RustedBones
Thank you for your patience, I'm sorry for delay with a response and I have several questions:
- What are the actual breaking changes? Could you list them?
- Are all review comments already addressed and, if not, could you elaborate why?
- Could you squash all commits and rebase your feature branch against
masterinstead of merge it?
Sure @aromanenko-dev!
API breaking changes:
Runtime breaking changes:
This comment and this one are not answered. I'm not sure I understood properly. I think the generic codepath is already covered by |
26261ec to
5326358Comparearomanenko-dev
commented
Mar 9, 2022
Run Java PreCommit |
aromanenko-dev
left a comment
There was a problem hiding this comment.
Many thanks for details!
Can we avoid these or most of the breaking changes? I'd prefer to deprecate it and add a new functionality at first then just remove it?
There was a problem hiding this comment.
Why do we need this be public?
There was a problem hiding this comment.
Constructor need to be accessed from AvroCoder and users should be able to extends the class to create their own coder
There was a problem hiding this comment.
Why do we need public constructors?
There was a problem hiding this comment.
I guess it was a question if we can avoid breaking changes here, isn't it?
Unifies how AvroCoder and AvroIO works with datum reader and writer so that clients can either use Avro 1.8 or 1.9 without changing base behaviour and limited breaking changes.
5326358 to
62c0b05Compareaaltay
commented
Apr 28, 2022
Is this still in progress? Could this be closed? |
RustedBones
commented
Apr 29, 2022
I've addressed the last comments. Is there anything else you'd want to be improved ?
|
aaltay
commented
May 12, 2022
Friendly ping @aromanenko-dev to take another look. |
aromanenko-dev
commented
May 13, 2022
I'm sorry for not being clear from the beginning (for my excuse, I was a little bit out of the context) but since this topic (Avro version update in Beam) seems doesn't have an obvious and strait-forward solution for now, I started a discussion on dev@beam.apache.org to decide how we should move forward with this. |
RustedBones
commented
Oct 13, 2022
Did you come to any decision concerning Avro's future in beam ? |
aromanenko-dev
commented
Oct 13, 2022
@RustedBones Unfortunately, there is no perfect solution for that. We are working on design doc that should help us to move forward. I hope to send it to dev@beam.apache.org soon. |
RustedBones
commented
Mar 1, 2023
@aromanenko-dev should some of the bug fixes be ported into the new avro extension module ? |
aromanenko-dev
commented
Mar 6, 2023
@RustedBones Since starting from Beam 2.46.0 |
aromanenko-dev
commented
Mar 6, 2023
@RustedBones Would you mind to close this PR because of transition to |
RustedBones
commented
Mar 7, 2023
Sounds good. I'll move the changes to the new dedicated extension module. |
aromanenko-dev
commented
Mar 7, 2023
Thanks, @RustedBones! I'd be happy to review them |
Follow up from: #16080 (comment)
Beam can run with different versions of avro at runtime. However, some fixes from avro 1.9 are not visible due to beam internals
SpecificDataform the class.CustomEncodingwith theAvroEncodeannotation or manually add the conversion to their ownReflectDatawhich is not possible everywhere in beam.date,time-millis,time-micros,timestampt-micros). This should not be in the framework but in the user codeThis PR aims to
useReflectApimust be disabled)DatumWriterFactoryandDatumReaderFactoryused by beam internalsNeeds discussion:
AvroCodershould have constructor withDatumWriterFactoryandDatumReaderFactorybut this causes a serialization issue with theAvroCoderCloudObjectTranslatorwhenre the object needs to be converted into a json form.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-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
ValidatesRunnercompliance status (on master branch)Examples testing status on various runners
Post-Commit SDK/Transform Integration Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.