hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atreju <n.atr...@gmail.com>
Subject Re: Searching rows for array of key values
Date Wed, 05 May 2010 18:24:24 GMT
Thanks for your response. I can make the array lexicographical. But the
array will not have all the values that are in the HBase table. The range
for scan can be from 1,000 to 10,000 and I can only have 1,000 keys in the
array, whereas HBase table has let's say 6,000 rows for that range. If I
use range scan then I need to loop thru the found rows and find the ones
that their key is in the requested array. Please let me know if there is any
other way to get just the rows that are needed in one shot. Otherwise I will
go with the range scan and looping method.

Thanks again.
On Tue, May 4, 2010 at 6:04 PM, Jean-Daniel Cryans <jdcryans@apache.org>wrote:

> If your row keys are sorted in a lexicographical way (padded with
> zeroes in your case since it's longs) then simply use a scanner:
>
>
> http://hadoop.apache.org/hbase/docs/r0.20.3/api/org/apache/hadoop/hbase/client/Scan.html
>
> Configure it with a start and end row key, configure setCaching to the
> number of rows you need and it will do a single RPC to fetch
> everything very efficiently. The exact response time depends on your
> hardware, caching, and data size.
>
> J-D
>
> On Tue, May 4, 2010 at 3:16 PM, atreju <n.atreju@gmail.com> wrote:
> > Hello,
> >
> >
> >
> > I am doing a research on HBase if we can use it efficiently in our
> company.
> > I need to be able get/scan list of rows for an array of key values
> (sorted,
> > long type). The array size will be 1,000 to 10,000. The table will have a
> > few hundred million rows. What is the most efficient (fastest) way to get
> > the list of rows for the requested row key values?
> >
> >
> >
> > Thanks.
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message