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

Remove redundant chooseTarget methods in BlockPlacementPolicy.java

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.0.0-alpha1
    • 2.0.2-alpha
    • namenode
    • None
    • 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

        1. HDFS-3887.patch
          22 kB
          Jing Zhao

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: