----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/21618/ -----------------------------------------------------------
(Updated May 20, 2014, 9:19 a.m.) Review request for DataFu and Matthew Hayes. Changes ------- * Updated to address the comments below. * The random variants are in a separate UDF "HasherRand" -- the dominant case is that we can create the hash func in constructor, and so making everyone check that the hash function is there on every call seems silly. ** Is there a method I can hook into that happens on the backend and before any call to exec() is made? * Uses the change in DATAFU-50 * Made the no-args default constructor return a murmur3-32 instance, rather than good-32. The "different on every run" behavior is too surprising to make it be the default; and those who don't read the docs will value speed over anorak considerations. I'm aware that I have a strong Ruby accent when speaking Java, so if there are more natural ways of accomplishing this please advise. Bugs: DATAFU-47 https://issues.apache.org/jira/browse/DATAFU-47 Repository: datafu Description ------- Accompanies DATAFU-47 https://issues.apache.org/jira/browse/DATAFU-47 -- make sure to apply the patch from DATAFU-46 too first Questions for reviewers: * If we upgrade Guava, we'd get sip24 (a fast cryptographically secure hash), crc32 and adler32 (occasionally useful checksums). I can put the update in as another patch. Should we upgrade? * This UDF provides the same hashes as MD5 and SHA udfs. Should those be deprecated in favor of this? I can add the binhex functionality so that nothing is lost. * If there's a standard way to do the dependency injection of a fixed random number generator for the tests please advise. Diffs (updated) ----- datafu-pig/src/main/java/datafu/pig/hash/Hasher.java PRE-CREATION datafu-pig/src/main/java/datafu/pig/hash/HasherRand.java PRE-CREATION datafu-pig/src/test/java/datafu/test/pig/hash/HashTests.java 7ff8fb9 datafu-pig/src/test/java/datafu/test/pig/hash/HasherRandForTesting.java PRE-CREATION Diff: https://reviews.apache.org/r/21618/diff/ Testing ------- ./gradlew :datafu-pig:test -Dtest.single=HashTests Thanks, Philip (flip) Kromer