List Info

Thread: how to read a table in hbase from the first row to the last?




how to read a table in hbase from the first row to the last?
user name
2008-01-21 05:21:29
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?
user name
2008-01-21 05:29:51
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 <maqiang1984gmail.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.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )