[jira] [Comment Edited] (HBASE-23355) Add a conf key to decide which operations can trigger prefetch

2019-12-01 Thread chenxu (Jira)


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

chenxu edited comment on HBASE-23355 at 12/2/19 7:52 AM:
-

There also may be a scenario that we don't need cacheOnWrite and 
prefetchOnFlush, but prefetchOnRegionOpen is needed.
 So how about consider both case?
{code:java}
if (cacheOnWrite || ! prefetchOnFlush) {
  // bypass prefetch operations
}
{code}


was (Author: javaman_chen):
There also may be a scenario that we don't need cacheOnWrite and 
prefetchOnFlush, but prefetchOnRegionOpen is needed.
So how about consider both case?
if (cacheOnWrite || ! prefetchOnFlush)  {
  // bypass prefetch operations 
}

> Add a conf key to decide which operations can trigger prefetch
> --
>
> Key: HBASE-23355
> URL: https://issues.apache.org/jira/browse/HBASE-23355
> Project: HBase
>  Issue Type: Improvement
>Reporter: chenxu
>Assignee: chenxu
>Priority: Major
>
> Copy the comment from anoop under 
> https://issues.apache.org/jira/browse/HBASE-23066?focusedCommentId=16984140=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16984140
> {quote}On a side note, (Not related to this issue) when we have cache on 
> write ON as well as prefetch also On, do we do the caching part for the 
> flushed files twice? When it is written, its already been added to cache. 
> Later as part of HFile reader open, the prefetch threads will again do a read 
> and add to cache!
> {quote}
> It's better to have a conf key to decide which operations(flush, compaction, 
> regionOpen, bulkload) can trigger the prefetch. In this way, if cacheonwrite 
> is enabled, we can exclude the flush and compaction operations when doing 
> prefetch.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (HBASE-23355) Add a conf key to decide which operations can trigger prefetch

2019-12-01 Thread Anoop Sam John (Jira)


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

Anoop Sam John edited comment on HBASE-23355 at 12/2/19 4:54 AM:
-

Do we need a new conf key? Why?  We can decide based on the existing conf 
values only?
When cache on write is true, dont do the prefetch for flushed files. When the 
new conf that is added in HBASE-23066 is true, dont do same for compaction 
also.  Hard to know at the HFile reader open time what is the context?


was (Author: anoop.hbase):
Do we need a new conf key? Why?  We can decide based on the existing conf 
values only?
When cache on write is true, dont do the prefetch for flushed files. When the 
new conf that u added in other jira is true, dont do same for compaction also.  
Hard to know at the HFile reader open time what is the context?

> Add a conf key to decide which operations can trigger prefetch
> --
>
> Key: HBASE-23355
> URL: https://issues.apache.org/jira/browse/HBASE-23355
> Project: HBase
>  Issue Type: Improvement
>Reporter: chenxu
>Assignee: chenxu
>Priority: Major
>
> Copy the comment from anoop under 
> https://issues.apache.org/jira/browse/HBASE-23066?focusedCommentId=16984140=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16984140
> {quote}On a side note, (Not related to this issue) when we have cache on 
> write ON as well as prefetch also On, do we do the caching part for the 
> flushed files twice? When it is written, its already been added to cache. 
> Later as part of HFile reader open, the prefetch threads will again do a read 
> and add to cache!
> {quote}
> It's better to have a conf key to decide which operations(flush, compaction, 
> regionOpen, bulkload) can trigger the prefetch. In this way, if cacheonwrite 
> is enabled, we can exclude the flush and compaction operations when doing 
> prefetch.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)