You are right, there is not much documentation on this.  This would probably
be a good thing to add to the documentation or wiki.

See the comments on https://issues.apache.org/jira/browse/HBASE-1218 for
clues as to how the IN_MEMORY setting is implemented.  It applies to
column-families, not entire tables.  If you have the HBase source code, you
can find the critical logic in
org.apache.hadoop.hbase.io.hfile.LruBlockCache which prioritizes "in memory"
blocks over multi-access blocks and subsequently over single access blocks
when needing to free memory.  So by setting IN_MEMORY for a column family,
you are more likely to have the data for that column family in memory when
you need it.  The default value is false.

The BLOCKCACHE setting allows you to set whether or not a block cache is
used at all for the column family.  The default value for that is true.  If
block cache is disabled, the contents would presumably be read from the file
system for each read.

Hope that helps.

Thanks,
Duane

> From: 罗磊 <[email protected]>
> Reply-To: "[email protected]" <[email protected]>
> Date: Sat, 24 Jul 2010 06:12:43 -0700
> To: "[email protected]" <[email protected]>
> Subject: Options about building database
> 
> Hi users:
> 
> There're many options while building a database. For example, "IN_MEMORY",
> "BLOCKCACHE", what do they mean? There is little information about these I
> can find. Who can explain them?
> 
> Thanks
> 
> Luo Lei

Reply via email to