hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r770429 - /hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/KeyValue.java
Date Thu, 30 Apr 2009 20:07:48 GMT
Author: stack
Date: Thu Apr 30 20:07:48 2009
New Revision: 770429

URL: http://svn.apache.org/viewvc?rev=770429&view=rev
Log:
HBASE-1322 hbase-1234 broke TestAtomicIncrement; fix and reenable

Modified:
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/KeyValue.java

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/KeyValue.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/KeyValue.java?rev=770429&r1=770428&r2=770429&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/KeyValue.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/KeyValue.java Thu Apr 30 20:07:48
2009
@@ -466,7 +466,8 @@
     return bytes;
   }
 
-  // Needed doing 'contains' on List.
+  // Needed doing 'contains' on List.  Only compares the key portion, not the
+  // value.
   public boolean equals(Object other) {
     KeyValue kv = (KeyValue)other;
     // Comparing bytes should be fine doing equals test.  Shouldn't have to
@@ -960,7 +961,9 @@
   }
 
   /**
-   * Compare KeyValues.
+   * Compare KeyValues.  When we compare KeyValues, we only compare the Key
+   * portion.  This means two KeyValues with same Key but different Values are
+   * considered the same as far as this Comparator is concerned.
    * Hosts a {@link KeyComparator}.
    */
   public static class KVComparator implements java.util.Comparator<KeyValue> {
@@ -1316,7 +1319,7 @@
   }
 
   /**
-   * Compare key portion of a {@link KeyValue}
+   * Compare key portion of a {@link KeyValue}.
    */
   public static class KeyComparator implements RawComparator<byte []> {
     volatile boolean ignoreTimestamp = false;



Mime
View raw message