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 answer, Alex.

-Kevin

On Thu, Apr 19, 2012 at 9:03 PM, Alex Baranau <[email protected]>wrote:

> 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.
>
> Note: setCacheBlocks(true) will not override your columnfamily settings, so
> do not disable it on that level.
>
> Alex Baranau
> ------
> Sematext :: http://blog.sematext.com/ :: Solr - Lucene - Hadoop - HBase
>
> On Thu, Apr 19, 2012 at 12:52 PM, Kevin M <[email protected]>
> wrote:
>
> > 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 the previous scan?
> >
> > Thank you.
> >
> >
> >
> >
>

Reply via email to