[ 
https://issues.apache.org/jira/browse/HBASE-22888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16925117#comment-16925117
 ] 

chenxu edited comment on HBASE-22888 at 9/8/19 9:01 AM:
--------------------------------------------------------

Thank you for the valueable comments, [~anoop.hbase]
{quote}Do we really need to do this copy? The stream reader's block index 
reader can directly refer to the pread HFileReader's block index reader?
{quote}
I think it's necessary, Otherwise we need to call readMultiLevelIndexRoot and 
readRootIndex in all StreamReader, and read the index from HFile again
{quote}Checking the E2E reader creation flow, I can see it will again call the 
CP hooks around the StoreFileReader creation! May be even that is not needed 
really? More over can we do this clone stuff within the HFileReader itself? 
Same way would have been best for StoreFileReader also so that we can avoid the 
CP hooks calls 
{quote}
The CP hooks may be required by the upper layer?Want to know if removal will 
have an impact on upper-layer applications such as phoenix.


was (Author: javaman_chen):
Thank you for the valueable comments, [~anoop.hbase]
bq. Do we really need to do this copy? The stream reader's block index reader 
can directly refer to the pread HFileReader's block index reader?
I think it's necessary, Otherwise we need to call readMultiLevelIndexRoot and 
readRootIndex in all StreamReader read the index info from HFile again
bq. Checking the E2E reader creation flow, I can see it will again call the CP 
hooks around the StoreFileReader creation! May be even that is not needed 
really? More over can we do this clone stuff within the HFileReader itself? 
Same way would have been best for StoreFileReader also so that we can avoid the 
CP hooks calls 
The CP hooks may be required by the upper layer?Want to know if removal will 
have an impact on upper-layer applications such as phoenix.

> Use separate classe to deal with streaming read and pread
> ---------------------------------------------------------
>
>                 Key: HBASE-22888
>                 URL: https://issues.apache.org/jira/browse/HBASE-22888
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 2.0.0
>            Reporter: chenxu
>            Assignee: chenxu
>            Priority: Major
>
> When switching pread to stream read, new HFileReaderImpl will be create, but 
> the two different readers do not share informations with each other. maybe we 
> can divide HFileReaderImpl into two different class, such as HFilePreadReader 
> and HFileStreamReader. When constructing HFileStreamReader, it will copy some 
> stuffs (fileInfo, index, etc) from an already existing Reader, and no need to 
> do prefetch operations.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to