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

Anoop Sam John commented on HBASE-15061:
----------------------------------------

bq.Is your suggestion to potentially moving the caching setting into the 
constructor to make it a required argument?
No I dont mean that.   Constructor to have the list of store files and readpnt 
is enough.  We have methods like withCacheEnabled(), withPread etc now right. I 
mean call it at all create places even if the value to be used there is default 
one there.  So readers dont have to go to the builder to know what is the 
default values.  Am I making it clear?

> Refactor StoreFileScanner creation to builder pattern
> -----------------------------------------------------
>
>                 Key: HBASE-15061
>                 URL: https://issues.apache.org/jira/browse/HBASE-15061
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 2.0.0
>            Reporter: Jonathan Hsieh
>            Assignee: Jonathan Hsieh
>             Fix For: 2.0.0
>
>         Attachments: hbase-15061.patch, hbase-15061.v2.patch
>
>
> There are several falvors of  calls that creates a list of StoreFileScanners, 
> and new feature have been added to this recently.  This patch converts the 
> somewhat difficult to read (need to go to javadoc) call:
> {code}
> // which args are the most relevant to this?
> -      List<StoreFileScanner> sfScanners = 
> StoreFileScanner.getScannersForStoreFiles(sfs,
> -        cacheMobBlocks, true, false, false, readPt);
> {code}
> into one that is more literate:
> {code}
> // ah, very clearly we are using defaults except for the caching settings
> +      List<StoreFileScanner> sfScanners = new 
> StoreFileScanner.ListBuilder(sfs, readPt)
> +          .withCacheBlocks(cacheMobBlocks).build();
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to