You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Heng Chen (JIRA)" <ji...@apache.org> on 2016/07/01 03:26:11 UTC
[jira] [Commented] (HBASE-15844) We should respect
hfile.block.index.cacheonwrite when write intermediate index Block
[ https://issues.apache.org/jira/browse/HBASE-15844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15358315#comment-15358315 ]
Heng Chen commented on HBASE-15844:
-----------------------------------
And more thoughts, i think we should cache root index block when write by default. Currently it seems not do this work
{code: title=BlockIndexWriter#writeIndexBlocks}
// write the root level
long rootLevelIndexPos = out.getPos();
{
DataOutput blockStream =
blockWriter.startWriting(BlockType.ROOT_INDEX);
rootChunk.writeRoot(blockStream);
if (midKeyMetadata != null)
blockStream.write(midKeyMetadata);
blockWriter.writeHeaderAndData(out);
}
{code}
> We should respect hfile.block.index.cacheonwrite when write intermediate index Block
> ------------------------------------------------------------------------------------
>
> Key: HBASE-15844
> URL: https://issues.apache.org/jira/browse/HBASE-15844
> Project: HBase
> Issue Type: Bug
> Reporter: Heng Chen
> Fix For: 2.0.0
>
> Attachments: HBASE-15844.patch
>
>
> {code: title=BlockIndexWriter#writeIntermediateBlock}
> if (cacheConf != null) {
> HFileBlock blockForCaching = blockWriter.getBlockForCaching(cacheConf);
> cacheConf.getBlockCache().cacheBlock(new BlockCacheKey(nameForCaching,
> beginOffset, true, blockForCaching.getBlockType()), blockForCaching);
> }
> {code}
> The if condition should be ?
> {code}
> if (cacheConf != null && cacheConf.shouldCacheIndexesOnWrite())
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)