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

Refactoring in RegionStates, and RSProcedureDispatcher

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0-beta-1, 2.0.0
    • None
    • None

    Description

      Working on a bug fix, was in these parts for first time to understand new AM and trying to make sense of things. Did a few improvements on the way.

      • Adding javadoc comments
      • Bug: ServerStateNode#regions is HashSet but there's no synchronization to prevent concurrent addRegion/removeRegion. Let's use concurrent set instead.
      • Use getRegionsInTransitionCount() directly to avoid instead of getRegionsInTransition().size() because the latter copies everything into a new array - what a waste for just the size.
      • There's mixed use of getRegionNode and getRegionStateNode for same return type - RegionStateNode. Changing everything to getRegionStateNode. Similarly rename other *RegionNode() fns to *RegionStateNode().
      • RegionStateNode#transitionState() return value is useless since it always returns it's first param.
      • Other minor improvements

      Attachments

        1. HBASE-19367.master.001.patch
          58 kB
          Apekshit Sharma
        2. HBASE-19367.master.002.patch
          59 kB
          Apekshit Sharma
        3. HBASE-19367.master.003.patch
          62 kB
          Apekshit Sharma
        4. HBASE-19367.master.004.patch
          63 kB
          Apekshit Sharma

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: