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
This commit is contained in:
Michael Stack 2013-07-28 22:12:46 +00:00
parent 52bace8612
commit bea9384779
1 changed files with 4 additions and 2 deletions

View File

@ -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 {
}
</programlisting>
</para>
<para>Note that generally the easiest way to specify a specific stop point for a scan is by using the <link xlink:href="http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/InclusiveStopFilter.html">InclusiveStopFilter</link> class.
</para>
</section>
<section xml:id="delete">
<title>Delete</title>