-
Notifications
You must be signed in to change notification settings - Fork 617
Various improvements to Bloom Filter work #4986
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
Conversation
Generated by 🚫 Danger |
Coverage Report 1Affected Products
Test Logs |
Size Report 1Affected Products
Test Logs |
Startup Time Report 1Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS. Startup time comparison between the CI merge commit (8628b99) and the base commit (2573baa) are not available. No macrobenchmark data found for the base commit (2573baa). Analysis for the CI merge commit (8628b99) can be found at: |
if (bitmap == null) { | ||
throw new NullPointerException("Bitmap cannot be null."); | ||
} | ||
/** |
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.
Thank you for adding the docs.
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.
Looks great.
This PR is a small selection of improvements to the bloom filter work in #4982.
Improvements include
QueryTest.java
andTestingHooksUtil.java
via./gradlew googleJavaFormat
.BloomFilter
classfinal
.BloomFilter
now takesByteString
instead ofbyte[]
to avoid making unnecessary copies of the byte array; it also models a read-only byte array better thanbyte[]
.BloomFilter.create()
added to more idiomatically provide the "validation" logic of the bloom filter's parameters.BloomFilter
toString() and exception tests made less brittle by only validating a substring of the exception's message, rather than the entire message (Googlers see go/java-testing/exceptions).