You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by jlei liu <li...@gmail.com> on 2012/09/03 11:03:55 UTC

when all index block are in block cahe , the scan should use random-read

I am using the Hbase0.94 version.


The scan use sequential read in Hbase0.94.

if all index block of one HFile are  in block cache , when user set start
key and stop key, we can use  *BlockIndexReader.seekToDataBlock(startKey)
and BlockIndexReader.seekToDataBlock(**stopKey) to receive offsets of start
data block and end data block, and then we can use the pread to implement
scan, I think that can improve scan performance.


*

Re: when all index block are in block cahe , the scan should use random-read

Posted by yu...@gmail.com.
Can you log a Jira ?

If you provide a patch, that would be great. 

Thanks



On Sep 3, 2012, at 2:03 AM, jlei liu <li...@gmail.com> wrote:

> I am using the Hbase0.94 version.
> 
> 
> The scan use sequential read in Hbase0.94.
> 
> if all index block of one HFile are  in block cache , when user set start
> key and stop key, we can use  *BlockIndexReader.seekToDataBlock(startKey)
> and BlockIndexReader.seekToDataBlock(**stopKey) to receive offsets of start
> data block and end data block, and then we can use the pread to implement
> scan, I think that can improve scan performance.
> 
> 
> *