You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Mikhail Bautin (Commented) (JIRA)" <ji...@apache.org> on 2012/01/30 20:37:10 UTC
[jira] [Commented] (HBASE-5012) Unify data/index/bloom and meta
block read methods in HFileReaderV{1,2}
[ https://issues.apache.org/jira/browse/HBASE-5012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13196354#comment-13196354 ]
Mikhail Bautin commented on HBASE-5012:
---------------------------------------
Another issue that Kannan mentioned as part of a code review for the 89-fb port of HBASE-4422 (https://reviews.facebook.net/D1341). This seems like an appropriate place to address it.
In the readBlockBuffer method in HFileReaderV1 we have
{code:title=HFileReaderV1.java|borderStyle=solid}
HFileBlock cachedBlock =
(HFileBlock) cacheConf.getBlockCache().getBlock(cacheKey,
cacheConf.shouldCacheDataOnRead());
{code}
but later in the method the condition used for actually caching the block is different:
{code:title=HFileReaderV1.java|borderStyle=solid}
// Cache the block
if (cacheBlock && cacheConf.shouldCacheBlockOnRead(
hfileBlock.getBlockType().getCategory())) {
cacheConf.getBlockCache().cacheBlock(cacheKey, hfileBlock,
cacheConf.isInMemory());
}
{code}
We need to make these "cache block" flags two consistent across these two code spots as we unify getMetaBlock and readBlock[Buffer], and double-check this across HFileReaderV{1,2}.
> Unify data/index/bloom and meta block read methods in HFileReaderV{1,2}
> -----------------------------------------------------------------------
>
> Key: HBASE-5012
> URL: https://issues.apache.org/jira/browse/HBASE-5012
> Project: HBase
> Issue Type: Improvement
> Reporter: Mikhail Bautin
> Assignee: Mikhail Bautin
> Priority: Minor
>
> Reduce code duplication between getMetaBlock and readBlock in HFileReaderV1 and HFileReaderV2.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira