/[Apache-SVN]/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/JenkinsHash.java
ViewVC logotype

Diff of /hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/JenkinsHash.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 656868, Thu May 15 22:10:47 2008 UTC revision 689888, Thu Aug 28 16:49:51 2008 UTC
# Line 43  public class JenkinsHash { Line 43  public class JenkinsHash {
43    private static long BYTE_MASK = 0x00000000000000ffL;    private static long BYTE_MASK = 0x00000000000000ffL;
44    
45    private static long rot(long val, int pos) {    private static long rot(long val, int pos) {
46      return Long.valueOf(Integer.rotateLeft(      return ((long)(Integer.rotateLeft(
47          Long.valueOf(val & INT_MASK).intValue(), pos)).longValue() & INT_MASK;          (int)(val & INT_MASK), pos)) & INT_MASK);
48    }    }
49    
50    /**    /**
# Line 202  public class JenkinsHash { Line 202  public class JenkinsHash {
202        a = (a + (key[offset + 0]    & BYTE_MASK)) & INT_MASK;        a = (a + (key[offset + 0]    & BYTE_MASK)) & INT_MASK;
203        break;        break;
204      case  0:      case  0:
205        return Long.valueOf(c & INT_MASK).intValue();        return (int)(c & INT_MASK);
206      }      }
207      /*      /*
208       * final -- final mixing of 3 32-bit values (a,b,c) into c       * final -- final mixing of 3 32-bit values (a,b,c) into c
# Line 249  public class JenkinsHash { Line 249  public class JenkinsHash {
249      b ^= a; b = (b - rot(a,14)) & INT_MASK;      b ^= a; b = (b - rot(a,14)) & INT_MASK;
250      c ^= b; c = (c - rot(b,24)) & INT_MASK;      c ^= b; c = (c - rot(b,24)) & INT_MASK;
251    
252      return Long.valueOf(c & INT_MASK).intValue();      return (int)(c & INT_MASK);
253    }    }
254    
255    /**    /**

Legend:
Removed from v.656868  
changed lines
  Added in v.689888

apache@apache.org
ViewVC Help
Powered by ViewVC 1.1.2