Skip to content

Conversation

@AlexKbit
Copy link
Contributor

Hi @kennknowles !
Could you please review my changes:

  1. Deprecate Coder.consistentWithEquals method and add javadoc
  2. Remove overriding from coders in the java-core

I'm not sure about removal of overriding from :
org.apache.beam.sdk.coders.MapCoder#consistentWithEquals
org.apache.beam.sdk.coders.ListCoder#consistentWithEquals

because it breaks the tests below:
org.apache.beam.sdk.coders.MapCoderTest > testConsistentWithEquals FAILED
org.apache.beam.sdk.coders.ListCoderTest > testConsistentWithEquals FAILED

I can rewrite these tests if it's necessary.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- --- --- --- ---
Java Build Status Build Status Build Status Build Status
Build Status
Build Status
Build Status Build Status Build Status
Python Build Status
Build Status
--- Build Status
Build Status
Build Status --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

@kennknowles kennknowles self-requested a review March 15, 2019 23:00
Copy link
Member

@kennknowles kennknowles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

Copy link
Member

@kennknowles kennknowles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. This looks like a good improvement.

@AlexKbit
Copy link
Contributor Author

AlexKbit commented Mar 24, 2019

@kennknowles this change will ready to merge, If you don't have other comments

@AlexKbit
Copy link
Contributor Author

AlexKbit commented Mar 25, 2019

@kennknowles PR squashed & ready to merge.
Thank you for your time!

@kennknowles
Copy link
Member

@AlexKbit I opened a pull request to you for minor changes. Did you see it?

@AlexKbit
Copy link
Contributor Author

AlexKbit commented Mar 25, 2019

@kennknowles Do you mean tests with hardcoded expected result for consistentWithEquals?
Yep. I removed tests from ListCoderTest & MapCoderTest.

@kennknowles
Copy link
Member

https://github.com/AlexKbit/beam/pull/1

@AlexKbit
Copy link
Contributor Author

@kennknowles should i do squash with this changes again?

@kennknowles
Copy link
Member

I can squash them for you. Thanks!

@kennknowles kennknowles merged commit 43db80d into apache:master Mar 25, 2019
@kennknowles
Copy link
Member

Thanks! If you want to follow-up there is good test coverage missing here: each coder could have a test, shared in CoderProperties, that the equality on encoded bytes matches the equality on structuralValue.

@AlexKbit
Copy link
Contributor Author

Thank you! Can you create another ticket for this task(assign to me)?

@kennknowles
Copy link
Member

@AlexKbit
Copy link
Contributor Author

Thank you! 😄

@AlexKbit AlexKbit deleted the feature/BEAM-3279 branch March 26, 2019 07:42
RobbeSneyders pushed a commit to RobbeSneyders/beam that referenced this pull request Apr 9, 2019
@kennknowles
Copy link
Member

Congratulations! This change (which is good) exposed a critical bug in the core SDK. We may have to roll this back, hopefully only temporarily, while we figure out what to do.

aaltay added a commit to aaltay/beam that referenced this pull request Apr 9, 2019
aaltay added a commit that referenced this pull request Apr 9, 2019
[BEAM-7038] Revert "[BEAM-3279] Deprecate and remove Coder.consistentWithEquals (#8071)
aaltay added a commit to aaltay/beam that referenced this pull request Apr 9, 2019
[BEAM-7038] Revert "[BEAM-3279] Deprecate and remove Coder.consistentWithEquals (apache#8071)
ibzib pushed a commit to ibzib/beam that referenced this pull request Apr 22, 2019
@kennknowles
Copy link
Member

To roll this forward, we need to do a few things:

  • understand which core transforms are affected when the serialized coder changes
  • preferred: replace all Java serialized coders in the core SDK with StructuredCoder
    • for runners like Dataflow (and I think Flink) that do in-place update, make them OK with the change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants