hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r689888 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/util/JenkinsHash.java
Date Thu, 28 Aug 2008 16:49:52 GMT
Author: stack
Date: Thu Aug 28 09:49:51 2008
New Revision: 689888

URL: http://svn.apache.org/viewvc?rev=689888&view=rev
Log:
HBASE-849   Speed improvement in JenkinsHash

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

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=689888&r1=689887&r2=689888&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Thu Aug 28 09:49:51 2008
@@ -34,6 +34,7 @@
                Kellerman)
    HBASE-843   Deleting and recreating a table in a single process does not work
                (Jonathan Gray via Jim Kellerman)
+   HBASE-849   Speed improvement in JenkinsHash (Andrzej Bialecki via Stack)
 
   IMPROVEMENTS
    HBASE-801  When a table haven't disable, shell could response in a "user

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/JenkinsHash.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/JenkinsHash.java?rev=689888&r1=689887&r2=689888&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/JenkinsHash.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/JenkinsHash.java Thu Aug 28 09:49:51
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