Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/14934 )

Change subject: [util] Import FastHash hash function to util
......................................................................


Patch Set 3:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/14934/3/java/kudu-client/src/main/java/org/apache/kudu/util/HashUtil.java
File java/kudu-client/src/main/java/org/apache/kudu/util/HashUtil.java:

http://gerrit.cloudera.org:8080/#/c/14934/3/java/kudu-client/src/main/java/org/apache/kudu/util/HashUtil.java@37
PS3, Line 37: long
Interesting, what happends when a signed type overflow in Java?  Is it the same 
as in C/C++?

Could you add a small note about that, please?


http://gerrit.cloudera.org:8080/#/c/14934/3/src/kudu/util/hash_util-test.cc
File src/kudu/util/hash_util-test.cc:

http://gerrit.cloudera.org:8080/#/c/14934/3/src/kudu/util/hash_util-test.cc@42
PS3, Line 42: // Test FastHash64/32 returns the expected values for inputs. 
These tests are
Does it make sense to add a small test to make sure this hash implementation 
runs faster than Google MurmurHash2?  Maybe, just to make sure there aren't any 
regressions. Or it's not possible to have a regression here since the 
implementation is not going to change after the initial commit? :)

Maybe, they have something like that at 
https://code.google.com/archive/p/fast-hash/ ?


http://gerrit.cloudera.org:8080/#/c/14934/3/src/kudu/util/hash_util.h
File src/kudu/util/hash_util.h:

http://gerrit.cloudera.org:8080/#/c/14934/3/src/kudu/util/hash_util.h@34
PS3, Line 34:     static const uint64_t MURMUR_PRIME = 0xc6a4a7935bd1e995;
nit: add UL suffix just for the unification with the way those constants are 
defined here and in FastHash64() ?


http://gerrit.cloudera.org:8080/#/c/14934/3/src/kudu/util/hash_util.h@73
PS3, Line 73:   static inline uint64_t FastHash64(const void* buf, size_t len, 
uint64_t seed) {
> Is the inline keyword needed here and below? The function is defined entire
+1


http://gerrit.cloudera.org:8080/#/c/14934/3/src/kudu/util/hash_util.h@74
PS3, Line 74: m
style nit: it should be some thing like M or kM, kMultiplier of whatever 
according to the google style guide


http://gerrit.cloudera.org:8080/#/c/14934/3/src/kudu/util/hash_util.h@74
PS3, Line 74: const
Would constexp do any difference here?


http://gerrit.cloudera.org:8080/#/c/14934/3/src/kudu/util/hash_util.h@75
PS3, Line 75:
nit: drop the extra space?


http://gerrit.cloudera.org:8080/#/c/14934/3/src/kudu/util/hash_util.h@86
PS3, Line 86:
nit: drop the extra space?



--
To view, visit http://gerrit.cloudera.org:8080/14934
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id0a21d6af10d9ba0dbd9ab46d73552d42976e8d7
Gerrit-Change-Number: 14934
Gerrit-PatchSet: 3
Gerrit-Owner: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Comment-Date: Sat, 21 Dec 2019 00:19:08 +0000
Gerrit-HasComments: Yes

Reply via email to