d definitely mention that startKey is inclusive and stopKey is
>exclusive and start <= match < stop.
>
>
>- Original Message -
>From: Joe Pallas
>To: user@hbase.apache.org
>Cc:
>Sent: Thursday, November 17, 2011 9:58 AM
>Subject: Re: Scans and lexical sorti
y, November 17, 2011 9:58 AM
Subject: Re: Scans and lexical sorting
On Nov 16, 2011, at 9:17 AM, lars hofhansl wrote:
> Hi Mark,
> good find. I think that works by accident and the book is wrong.
> "row" + new byte[] {0} will use byte[].toString() and actually result in
>
On Nov 16, 2011, at 9:17 AM, lars hofhansl wrote:
> Hi Mark,
> good find. I think that works by accident and the book is wrong.
> "row" + new byte[] {0} will use byte[].toString() and actually result in
> something like: "row[B@152b6651", which (again accidentally) sorts past rowN.
> "row" + ne
;,-1}
>
>We need to fix the book.
>
>-- Lars
>
>
>
>________________
>From: Mark
>To: user@hbase.apache.org
>Sent: Wednesday, November 16, 2011 7:59 AM
>Subject: Scans and lexical sorting
>
>Section 5.7.3 of the HBase book displays a
better, though.
You'd have to construct a byte array that is terminated by 255.
An easy way to do that is: byte[] row = new byte[] {'r','o','w',-1}
We need to fix the book.
-- Lars
From: Mark
To: user@hbase.apache.org
Sent: Wednes
Section 5.7.3 of the HBase book displays a scan operation:
HTable htable = ... // instantiate HTable
Scan scan = new Scan();
scan.addColumn(Bytes.toBytes("cf"),Bytes.toBytes("attr"));
scan.setStartRow( Bytes.toBytes("row"));
scan.setStopRow( Bytes.toBytes("row" + new byte[] {0})); // note