Oh I didn't get that part. If you can easily determine some rule for those row keys then you can set a filter with that rule on the scan (for example, you only want the impair row keys). Or you could even pass the list of row keys as a filter to the scan and do the comparison server-side... but it might be a stretch depending on the number of keus you need. But that's easily testable.
J-D On Wed, May 5, 2010 at 11:24 AM, atreju <n.atr...@gmail.com> wrote: > 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 <jdcry...@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.atr...@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. >> > >> >