Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-3887

Remove redundant chooseTarget methods in BlockPlacementPolicy.java

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 2.0.2-alpha
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      BlockPlacementPolicy.java contains multiple chooseTarget() methods with different parameter lists. It is difficult to follow and understand the code since some chooseTarget methods only have minor differences and some of them are only invoked by testing code.

      In this patch, I try to remove some of the chooseTarget methods and only keep three of them: two abstract methods and the third one using BlockCollection as its parameter.

        Attachments

          Activity

            People

            • Assignee:
              jingzhao Jing Zhao
              Reporter:
              jingzhao Jing Zhao
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: