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

Give priority to releasing DNs with less free space

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.3.0
    • None
    • hdfs
    • None

    Description

      When deleting redundant replicas, the one with the least free space should be prioritized.

      //BlockPlacementPolicyDefault#chooseReplicaToDelete
      final DatanodeStorageInfo storage;
      if (oldestHeartbeatStorage != null) {
        storage = oldestHeartbeatStorage;
      } else if (minSpaceStorage != null) {
        storage = minSpaceStorage;
      } else {
        return null;
      }
      excessTypes.remove(storage.getStorageType());
      return storage; 

      Change the above logic to the following:

      //BlockPlacementPolicyDefault#chooseReplicaToDelete
      final DatanodeStorageInfo storage;
      if (minSpaceStorage != null) {
        storage = minSpaceStorage;
      } else if (oldestHeartbeatStorage != null) {
        storage = oldestHeartbeatStorage;
      } else {
        return null;
      } 

      Attachments

        1. HDFS-16450.001.patch
          1 kB
          yanbin.zhang

        Activity

          People

            it_singer yanbin.zhang
            it_singer yanbin.zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m