Index: /src/java/org/apache/hadoop/hbase/io/RowResult.java =================================================================== --- /src/java/org/apache/hadoop/hbase/io/RowResult.java (revision 750573) +++ /src/java/org/apache/hadoop/hbase/io/RowResult.java (working copy) @@ -45,7 +45,8 @@ /** * Holds row name and then a map of columns to cells. */ -public class RowResult implements Writable, SortedMap, ISerializable { +public class RowResult implements Writable, SortedMap, + Comparable, ISerializable { private byte [] row = null; private final HbaseMapWritable cells; @@ -278,4 +279,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