hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r883829 - in /hadoop/hbase/branches/0.20: CHANGES.txt src/java/org/apache/hadoop/hbase/util/MurmurHash.java
Date Tue, 24 Nov 2009 19:29:26 GMT
Author: stack
Date: Tue Nov 24 19:29:25 2009
New Revision: 883829

URL: http://svn.apache.org/viewvc?rev=883829&view=rev
Log:
HBASE-1979 MurmurHash does not yield the same results as the reference C++ implementation
when size % 4 >= 2

Modified:
    hadoop/hbase/branches/0.20/CHANGES.txt
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/util/MurmurHash.java

Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=883829&r1=883828&r2=883829&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Tue Nov 24 19:29:25 2009
@@ -7,6 +7,8 @@
    HBASE-1999 When HTable goes away, close zk session in shutdown hook or
               something...
    HBASE-1997 zk tick time bounds maximum zk session time
+   HBASE-1979 MurmurHash does not yield the same results as the reference
+              C++ implementation when size % 4 >= 2 (Olivier Gillet via Stack)
 
   IMPROVEMENTS
 

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/util/MurmurHash.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/util/MurmurHash.java?rev=883829&r1=883828&r2=883829&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/util/MurmurHash.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/util/MurmurHash.java Tue Nov
24 19:29:25 2009
@@ -63,13 +63,13 @@
 
     if (left != 0) {
       if (left >= 3) {
-        h ^= data[length - 3] << 16;
+        h ^= data[len_m + 2] << 16;
       }
       if (left >= 2) {
-        h ^= data[length - 2] << 8;
+        h ^= data[len_m + 1] << 8;
       }
       if (left >= 1) {
-        h ^= data[length - 1];
+        h ^= data[len_m];
       }
 
       h *= m;



Mime
View raw message