Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-2560

Refactor BPOfferService to be a static inner class

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 0.24.0, 0.23.1
    • Component/s: datanode
    • Labels:
      None

      Description

      Currently BPOfferService is a non-static inner class of DataNode. For HA we are adding another inner class inside of this, which makes the scope very hard to understand when reading the code (and has resulted in subtle bugs like HDFS-2529 where a variable is referenced from the wrong scope. Making it a static inner class with a reference to the DN has two advantages: a) scope is now explicit, and b) enables unit testing of the BPOS against a mocked-out DN.

      1. hdfs-2560-final.txt
        28 kB
        Todd Lipcon
      2. hdfs-2560.txt
        30 kB
        Todd Lipcon
      3. hdfs-2560.txt
        30 kB
        Todd Lipcon

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Todd Lipcon
            Reporter:
            Todd Lipcon
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development