accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1334204 - /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/Key.java
Date Fri, 04 May 2012 21:51:25 GMT
Author: kturner
Date: Fri May  4 21:51:24 2012
New Revision: 1334204

URL: http://svn.apache.org/viewvc?rev=1334204&view=rev
Log:
ACCUMULO-450 added timestamp to key hash code

Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/Key.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/Key.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/Key.java?rev=1334204&r1=1334203&r2=1334204&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/Key.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/Key.java Fri May  4 21:51:24
2012
@@ -624,7 +624,8 @@ public class Key implements WritableComp
   @Override
   public int hashCode() {
     return WritableComparator.hashBytes(row, row.length) + WritableComparator.hashBytes(colFamily,
colFamily.length)
-        + WritableComparator.hashBytes(colQualifier, colQualifier.length) + WritableComparator.hashBytes(colVisibility,
colVisibility.length);
+        + WritableComparator.hashBytes(colQualifier, colQualifier.length) + WritableComparator.hashBytes(colVisibility,
colVisibility.length)
+        + (int) (timestamp ^ (timestamp >>> 32));
   }
   
   public static String toPrintableString(byte ba[], int offset, int len, int maxLen) {



Mime
View raw message