hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "edward yoon" <edw...@mail.udanax.org>
Subject Re: how to read a table in hbase from the first row to the last?
Date Mon, 21 Jan 2008 11:29:51 GMT
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 <maqiang1984@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.

Mime
View raw message