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

Make BlockManager#removeFromExcessReplicateMap accept BlockInfo instead of Block

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • namenode
    • None
    • Reviewed

    Description

      The BlockManager#removeFromExcessReplicateMap() method accepts a Block which is to remove from excessReplicateMap. However the excessReplicateMap maps a StorageID to the set of BlockInfo that are "extra" for the DataNode of the StorageID. Deleting a sub-class object from a collection provided a base-class object happens to work here.

      Alternatively, we can make the removeFromExcessReplicateMap accept a BlockInfo object. As the current call stack is passing BlockInfo object mostly, the code change should be safe.

      Attachments

        1. HDFS-9485.000.patch
          2 kB
          Mingliang Liu

        Issue Links

          Activity

            People

              liuml07 Mingliang Liu
              liuml07 Mingliang Liu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: