Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-15061

Refactor StoreFileScanner creation to builder pattern

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 2.0.0
    • None
    • None
    • None

    Description

      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();
      

      Attachments

        1. hbase-15061.patch
          21 kB
          Jonathan Hsieh
        2. hbase-15061.v2.patch
          21 kB
          Jonathan Hsieh

        Issue Links

          Activity

            People

              jmhsieh Jonathan Hsieh
              jmhsieh Jonathan Hsieh
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: