hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r689889 - in /hadoop/hbase/branches/0.2: CHANGES.txt src/java/org/apache/hadoop/hbase/util/JenkinsHash.java
Date Thu, 28 Aug 2008 16:53:50 GMT
Author: jimk
Date: Thu Aug 28 09:53:50 2008
New Revision: 689889

URL: http://svn.apache.org/viewvc?rev=689889&view=rev
Log:
HBASE-849  Speed improvement in JenkinsHash (Andrzej Bialecki via Jim Kellerman)

Modified:
    hadoop/hbase/branches/0.2/CHANGES.txt
    hadoop/hbase/branches/0.2/src/java/org/apache/hadoop/hbase/util/JenkinsHash.java

Modified: hadoop/hbase/branches/0.2/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.2/CHANGES.txt?rev=689889&r1=689888&r2=689889&view=diff
==============================================================================
--- hadoop/hbase/branches/0.2/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.2/CHANGES.txt Thu Aug 28 09:53:50 2008
@@ -47,6 +47,8 @@
    HBASE-752  HBase 0.2.1 should be based on Hadoop 0.17.2
    HBASE-799  Deprecate all remaining methods that take Text as a parameter
               (Jean-Daniel Cryans via Jim Kellerman)
+   HBASE-849  Speed improvement in JenkinsHash (Andrzej Bialecki via Jim
+              Kellerman)
 
   NEW FEATURES
   OPTIMIZATIONS

Modified: hadoop/hbase/branches/0.2/src/java/org/apache/hadoop/hbase/util/JenkinsHash.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.2/src/java/org/apache/hadoop/hbase/util/JenkinsHash.java?rev=689889&r1=689888&r2=689889&view=diff
==============================================================================
--- hadoop/hbase/branches/0.2/src/java/org/apache/hadoop/hbase/util/JenkinsHash.java (original)
+++ hadoop/hbase/branches/0.2/src/java/org/apache/hadoop/hbase/util/JenkinsHash.java Thu Aug
28 09:53:50 2008
@@ -43,8 +43,8 @@
   private static long BYTE_MASK = 0x00000000000000ffL;
 
   private static long rot(long val, int pos) {
-    return Long.valueOf(Integer.rotateLeft(
-        Long.valueOf(val & INT_MASK).intValue(), pos)).longValue() & INT_MASK;
+    return ((long)(Integer.rotateLeft(
+        (int)(val & INT_MASK), pos)) & INT_MASK);
   }
 
   /**
@@ -202,7 +202,7 @@
       a = (a + (key[offset + 0]    & BYTE_MASK)) & INT_MASK;
       break;
     case  0:
-      return Long.valueOf(c & INT_MASK).intValue();
+      return (int)(c & INT_MASK);
     }
     /*
      * final -- final mixing of 3 32-bit values (a,b,c) into c
@@ -249,7 +249,7 @@
     b ^= a; b = (b - rot(a,14)) & INT_MASK;
     c ^= b; c = (c - rot(b,24)) & INT_MASK;
 
-    return Long.valueOf(c & INT_MASK).intValue();
+    return (int)(c & INT_MASK);
   }
   
   /**



Mime
View raw message