You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by ma qiang <ma...@gmail.com> on 2008/01/21 12:21:29 UTC
how to read a table in hbase from the first row to the last?
Dear colleagues:
I am writing some code about reading a table in hbase from
the first row to the last . Can you tell me how ?
Thank you !
Re: how to read a table in hbase from the first row to the last?
Posted by edward yoon <ed...@mail.udanax.org>.
Use the scanner as describe below:
HTable table = new HTable(HBaseConfiguration conf, Text tableName);
HScannerInterface scan = table.obtainScanner(Text[] columns, new Text(""));
HStoreKey key = new HStoreKey();
TreeMap<Text, byte[]> results = new TreeMap<Text, byte[]>();
while (scan.next(key, results) {
..
}
On 1/21/08, ma qiang <ma...@gmail.com> wrote:
> Dear colleagues:
> I am writing some code about reading a table in hbase from
> the first row to the last . Can you tell me how ?
> Thank you !
>
--
B. Regards,
Edward yoon @ NHN, corp.