hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hsieh (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-15061) Refactor StoreFileScanner creation to builder pattern
Date Wed, 30 Dec 2015 22:04:49 GMT
Jonathan Hsieh created HBASE-15061:

             Summary: 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

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:

// which args are the most relevant to this?
-      List<StoreFileScanner> sfScanners = StoreFileScanner.getScannersForStoreFiles(sfs,
-        cacheMobBlocks, true, false, false, readPt);

into one that is more literate:

// ah, very clearly we are using defaults except for the caching settings
+      List<StoreFileScanner> sfScanners = new StoreFileScanner.ListBuilder(sfs, readPt)
+          .withCacheBlocks(cacheMobBlocks).build();

This message was sent by Atlassian JIRA

View raw message