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

MurmurHash3 support for fingerprint processor #70632

Merged
merged 4 commits into from
Mar 23, 2021

Conversation

danhermann
Copy link
Contributor

Closes #69182.

@danhermann danhermann added >enhancement :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP v8.0.0 v7.13.0 labels Mar 22, 2021
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Mar 22, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (Team:Core/Features)

@danhermann
Copy link
Contributor Author

@elasticmachine update branch

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

I left a couple of questions about this

Comment on lines 257 to 261
if (method.equalsIgnoreCase(MurmurHasher.METHOD)) {
return MurmurHasher.getInstance(method);
} else {
return MessageDigestHasher.getInstance(method);
}
Copy link
Member

Choose a reason for hiding this comment

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

I think I would prefer this logic to live inside of MessageDigestHasher.getInstance, so that callers could retrieve the Murmur hasher without having to do this if check (it looks just like another built-in MessageDigestHasher).

What do you think about moving it there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I can do that.

@@ -20,6 +20,8 @@
*/
public class Murmur3Hasher {

public static final String METHOD = "MurmurHash3_x64_128";
Copy link
Member

Choose a reason for hiding this comment

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

Do we expect to add a few different murmur hash types? This is a pretty awkward name, but it makes sense if we expect to add other configurations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not aware of any plans to add additional variants of the Murmur hash, so I think we could shorten it to MurmurHash3 as it's commonly known, possibly with a note in the docs that it's the x64/128 variant that's used.

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Dan!

@danhermann
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/packaging-sample-windows

@danhermann danhermann merged commit 2be24f0 into elastic:master Mar 23, 2021
@danhermann danhermann deleted the murmur3_support branch March 23, 2021 13:17
@danhermann
Copy link
Contributor Author

Thanks, @dakrone!

@danhermann danhermann changed the title Murmur3 hash support for fingerprint processor MurmurHash3 support for fingerprint processor Mar 23, 2021
danhermann added a commit to danhermann/elasticsearch that referenced this pull request Mar 31, 2021
@danhermann
Copy link
Contributor Author

cc: @elastic/es-ui in case auto-complete needs to be updated to accommodate this new hash method option.

@alisonelizabeth
Copy link
Contributor

alisonelizabeth commented Apr 19, 2021

cc: @elastic/es-ui in case auto-complete needs to be updated to accommodate this new hash method option.

Thanks for the heads up @danhermann! Have the docs been updated yet? To clarify, this adds MurmurHash3 to the available method options for the fingerprint processor, correct? So the supported methods should now be: MD5, SHA-1, SHA-256, SHA-512 and MurmurHash3.

@danhermann
Copy link
Contributor Author

Yes, the docs were updated in #70737.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >enhancement Team:Data Management Meta label for data/management team v7.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Murmur3 support for fingerprint processor
5 participants