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

Break out writer and reader from StoreFile

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • regionserver
    • None
    • Incompatible change, Reviewed
    • Hide
      <!-- mardown -->
      Refactor that breaks out StoreFile Reader and Writer inner classes as StoreFileReader and StoreFileWriter.

      NOTE! Changes RegionObserver Coprocessor Interface so incompatible change (Discussed on dev list in thread "[Note breaking change on RegionObserver in hbase-2.0.0](https://s.apache.org/hbase-dev-note-about-HBASE-15296)"
      Show
      <!-- mardown --> Refactor that breaks out StoreFile Reader and Writer inner classes as StoreFileReader and StoreFileWriter. NOTE! Changes RegionObserver Coprocessor Interface so incompatible change (Discussed on dev list in thread "[Note breaking change on RegionObserver in hbase-2.0.0]( https://s.apache.org/hbase-dev-note-about-HBASE-15296 )"

    Description

      StoreFile.java is trending to become a monolithic class, it's ~1800 lines. Would it make sense to break out reader and writer (~500 lines each) into separate files.

      We are doing so many different things in a single class: comparators, reader, writer, other stuff; and it hurts readability a lot, to the point that just reading through a piece of code require scrolling up and down to see which level (reader/writer/base class level) it belongs to. These small-small things really don't help while trying to understanding the code. There are good reasons we don't do these often (affects existing patches, needs to be done for all branches, etc). But this and a few other classes can really use a single iteration of refactoring to make things a lot better.

      Attachments

        1. HBASE-15296-branch-1.1.patch
          153 kB
          Apekshit Sharma
        2. HBASE-15296-branch-1.2.patch
          155 kB
          Apekshit Sharma
        3. HBASE-15296-branch-1.patch
          160 kB
          Apekshit Sharma
        4. HBASE-15296-master.patch
          200 kB
          Apekshit Sharma
        5. HBASE-15296-master-v2.patch
          203 kB
          Apekshit Sharma
        6. HBASE-15296-master-v3.patch
          205 kB
          Apekshit Sharma
        7. HBASE-15296-master-v4.patch
          208 kB
          Apekshit Sharma
        8. HBASE-15296-master-v5.patch
          208 kB
          Apekshit Sharma
        9. HBASE-15296-branch-1.patch
          216 kB
          Apekshit Sharma
        10. HBASE-15296-branch-1-v1.patch
          220 kB
          Apekshit Sharma

        Issue Links

          Activity

            People

              appy Apekshit Sharma
              appy Apekshit Sharma
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: