Skip to content
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-6693] replace mmh3 with default hash function #8799

Merged
merged 3 commits into from
Jun 10, 2019

Conversation

Hannah-Jiang
Copy link
Contributor

Replace mmh3 with default python hash function, because it's not reasonable to bring this inconvenience to production with only a little bit improvement with estimation for a loose estimation algorithm.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- Build Status --- --- Build Status
Java Build Status 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 --- --- Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status Build Status Build Status
Portable --- Build Status --- ---

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

@Hannah-Jiang Hannah-Jiang changed the title [WIP][BEAM-6693] replace mmh3 with default hash function [BEAM-6693] replace mmh3 with default hash function Jun 10, 2019
@Hannah-Jiang
Copy link
Contributor Author

R: @pabloem

label='assert:global_by_error_with_samll_population')
pipeline.run()

def test_approximate_unique_global_by_error_with_big_population(self):
Copy link
Member

Choose a reason for hiding this comment

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

Why are you removing this test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test is more for estimation algorithm performance testing, rather than for testing functionality. With py3 default hash algorithm, it would fail sometimes (2%) because it is out of estimation error range, so I decided to remove it.

@pabloem
Copy link
Member

pabloem commented Jun 10, 2019

Thanks Hannah. This LGTM. I just left one question. Thanks!

@@ -214,7 +212,7 @@ def create_accumulator(self, *args, **kwargs):

Copy link
Member

Choose a reason for hiding this comment

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

Suggestion (Maybe add a JIRA (does not have to be fixed in this PR) for future):

  • Pass a hash_fn argument to ApproximateUniqueCombineFn, that can be passed by users to customize the hash_fn they would like to use. It can default to hash

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pabloem pabloem merged commit a8d0094 into apache:master Jun 10, 2019
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.

None yet

3 participants