Re: Applying filters to ResultScanner

2012-04-19 Thread Alok Kumar
Thanks for pointing about setCacheBlocks() , its HBase default value will provide better performance for following Filters as well as for Kevin's multiple Facet search. -Alok On Fri, Apr 20, 2012 at 7:02 AM, Kevin M wrote: > Thanks for pointing me towards setCacheBlocks() and explaining the > d

Re: Applying filters to ResultScanner

2012-04-19 Thread Kevin M
Thanks for pointing me towards setCacheBlocks() and explaining the difference between those two types of caching in HBase. According to the API documentation, setCacheBlocks defaults to true, so it looks like HBase will take care of what I am looking for automatically. Thanks so much for your answ

Re: Applying filters to ResultScanner

2012-04-19 Thread Alex Baranau
Regarding caching during scans there are two types of caches: * caching (bufferring) the records before returning them to the client, enabled via scan.setCaching(numRows) * block cache on a regionserver, enabled via setCacheBlocks(true) The latter one (block cache) is what you are looking for. No

Re: Applying filters to ResultScanner

2012-04-19 Thread Kevin M
Thanks for the reply. I see. Would HBase cache the results of the first scan so it wouldn't take as long to collect the results? Say there were 5 facets selected one after another. A new scan would take place with more strict filtering each time on the whole table rather than to use the results of

Re: Applying filters to ResultScanner

2012-04-18 Thread Alok Kumar
Hi, I think you need to recreate "a Filter + attach it to Scan" and make a call to Hbase again in order to get a new set of results or ResultScanner. You are right, ResultScanner object need to be released quickly when u r done with it at middle tier. Below are the text from HBase book... *10.8.4