hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r750779 - in /hadoop/hbase/branches/0.19: CHANGES.txt src/java/org/apache/hadoop/hbase/io/RowResult.java
Date Fri, 06 Mar 2009 06:31:56 GMT
Author: stack
Date: Fri Mar  6 06:31:54 2009
New Revision: 750779

URL: http://svn.apache.org/viewvc?rev=750779&view=rev
Log:
HBASE-1240 Would be nice if RowResult could be comparable

Modified:
    hadoop/hbase/branches/0.19/CHANGES.txt
    hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/io/RowResult.java

Modified: hadoop/hbase/branches/0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19/CHANGES.txt?rev=750779&r1=750778&r2=750779&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.19/CHANGES.txt Fri Mar  6 06:31:54 2009
@@ -33,6 +33,8 @@
    HBASE-1231  Today, going from a RowResult to a BatchUpdate reqiures some
                data processing even though they are pretty much the same thing.
                (Erik Holstad via Stack)
+   HBASE-1240  Would be nice if RowResult could be comparable
+               (Erik Holstad via Stack)
 
 Release 0.19.0
   INCOMPATIBLE CHANGES

Modified: hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/io/RowResult.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/io/RowResult.java?rev=750779&r1=750778&r2=750779&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/io/RowResult.java (original)
+++ hadoop/hbase/branches/0.19/src/java/org/apache/hadoop/hbase/io/RowResult.java Fri Mar
 6 06:31:54 2009
@@ -248,4 +248,17 @@
     Bytes.writeByteArray(out, this.row);
     this.cells.write(out);
   }
+  
+  //
+  // Comparable
+  //
+  /**
+   *  Comparing this RowResult with another one by
+   *  comparing the row in it.
+   *  @param o the RowResult Object to compare to
+   *  @return the compare number
+   */
+  public int compareTo(Object o){
+    return Bytes.compareTo(this.row, ((RowResult)o).getRow());
+  }
 }
\ No newline at end of file



Mime
View raw message