hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r601886 - in /lucene/hadoop/trunk/src/contrib/hbase: CHANGES.txt src/java/org/onelab/filter/HashFunction.java src/test/org/onelab/test/TestFilter.java
Date Thu, 06 Dec 2007 22:34:39 GMT
Author: jimk
Date: Thu Dec  6 14:34:38 2007
New Revision: 601886

URL: http://svn.apache.org/viewvc?rev=601886&view=rev
Log:
HADOOP-2365 Result of HashFunction.hash() contains all identical values

Modified:
    lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/onelab/filter/HashFunction.java
    lucene/hadoop/trunk/src/contrib/hbase/src/test/org/onelab/test/TestFilter.java

Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt?rev=601886&r1=601885&r2=601886&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Thu Dec  6 14:34:38 2007
@@ -58,6 +58,7 @@
                (Edward Yoon via Stack)
    HADOOP-2347 REST servlet not thread safe but run in a threaded manner
                (Bryan Duxbury via Stack)
+   HADOOP-2365 Result of HashFunction.hash() contains all identical values
 
   IMPROVEMENTS
    HADOOP-2401 Add convenience put method that takes writable

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/onelab/filter/HashFunction.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/onelab/filter/HashFunction.java?rev=601886&r1=601885&r2=601886&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/onelab/filter/HashFunction.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/onelab/filter/HashFunction.java Thu
Dec  6 14:34:38 2007
@@ -112,7 +112,7 @@
       }
       int[] result = new int[nbHash];
       for (int i = 0, initval = 0; i < nbHash; i++) {
-        result[i] = Math.abs(JenkinsHash.hash(b, initval)) % maxValue;
+        initval = result[i] = Math.abs(JenkinsHash.hash(b, initval)) % maxValue;
       }
       return result;
   }//end hash() 

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/onelab/test/TestFilter.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/onelab/test/TestFilter.java?rev=601886&r1=601885&r2=601886&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/onelab/test/TestFilter.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/onelab/test/TestFilter.java Thu Dec
 6 14:34:38 2007
@@ -74,7 +74,7 @@
     bf.add(k2);
     bf.add(k3);
     assertTrue(bf.membershipTest(key));
-    assertFalse(bf.membershipTest(new StringKey("graknyl")));
+    assertTrue(bf.membershipTest(new StringKey("graknyl")));
     assertFalse(bf.membershipTest(new StringKey("xyzzy")));
     assertFalse(bf.membershipTest(new StringKey("abcd")));
   }
@@ -91,7 +91,7 @@
     bf.add(k2);
     bf.add(k3);
     assertTrue(bf.membershipTest(key));
-    assertFalse(bf.membershipTest(new StringKey("graknyl")));
+    assertTrue(bf.membershipTest(new StringKey("graknyl")));
     assertFalse(bf.membershipTest(new StringKey("xyzzy")));
     assertFalse(bf.membershipTest(new StringKey("abcd")));
   }
@@ -108,7 +108,7 @@
     bf.add(k2);
     bf.add(k3);
     assertTrue(bf.membershipTest(key));
-    assertFalse(bf.membershipTest(new StringKey("graknyl")));
+    assertTrue(bf.membershipTest(new StringKey("graknyl")));
     assertFalse(bf.membershipTest(new StringKey("xyzzy")));
     assertFalse(bf.membershipTest(new StringKey("abcd")));
   }



Mime
View raw message