From bea9384779e9cb8c5ef19dcb857b3bfe7aeb371f Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Sun, 28 Jul 2013 22:12:46 +0000 Subject: [PATCH] HBASE-9035 Incorrect example for using a scan stopRow in HBase book git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1507863 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/docbkx/book.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/docbkx/book.xml b/src/main/docbkx/book.xml index 331986faee5..1bbd4bae0c3 100644 --- a/src/main/docbkx/book.xml +++ b/src/main/docbkx/book.xml @@ -269,8 +269,8 @@ HTable htable = ... // instantiate HTable Scan scan = new Scan(); scan.addColumn(CF, ATTR); -scan.setStartRow( Bytes.toBytes("row")); // start key is inclusive -scan.setStopRow( Bytes.toBytes("row" + (char)0)); // stop key is exclusive +scan.setStartRow(Bytes.toBytes("row")); // start key is inclusive +scan.setStopRow(Bytes.toBytes("rox")); // stop key is exclusive ResultScanner rs = htable.getScanner(scan); try { for (Result r = rs.next(); r != null; r = rs.next()) { @@ -280,6 +280,8 @@ try { } + Note that generally the easiest way to specify a specific stop point for a scan is by using the InclusiveStopFilter class. +
Delete