Index: src/main/java/org/apache/hadoop/hbase/client/Scan.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/client/Scan.java (revision 1227043) +++ src/main/java/org/apache/hadoop/hbase/client/Scan.java (working copy) @@ -260,7 +260,8 @@ /** * Set the start row of the scan. - * @param startRow row to start scan on, inclusive + * @param startRow row to start scan on (inclusive) + * Note: In order to make startRow exclusive add a trailing 0 byte * @return this */ public Scan setStartRow(byte [] startRow) { @@ -271,6 +272,7 @@ /** * Set the stop row. * @param stopRow row to end at (exclusive) + * Note: In order to make stopRow inclusive add a trailing 0 byte * @return this */ public Scan setStopRow(byte [] stopRow) { Index: src/docbkx/book.xml =================================================================== --- src/docbkx/book.xml (revision 1227043) +++ src/docbkx/book.xml (working copy) @@ -262,7 +262,7 @@ Scan scan = new Scan(); scan.addColumn(Bytes.toBytes("cf"),Bytes.toBytes("attr")); scan.setStartRow( Bytes.toBytes("row")); // start key is inclusive -scan.setStopRow( Bytes.toBytes("row" + new byte[] {0})); // stop key is exclusive +scan.setStopRow( Bytes.toBytes("row" + (char)0)); // stop key is exclusive for(Result result : htable.getScanner(scan)) { // process Result instance }