You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "chuanjie.duan (Jira)" <ji...@apache.org> on 2020/10/28 06:40:00 UTC

[jira] [Created] (HDFS-15658) Improve datanode capability balancing

chuanjie.duan created HDFS-15658:
------------------------------------

             Summary: Improve datanode capability balancing
                 Key: HDFS-15658
                 URL: https://issues.apache.org/jira/browse/HDFS-15658
             Project: Hadoop HDFS
          Issue Type: Improvement
          Components: hdfs
            Reporter: chuanjie.duan


How about adjust the order of choosing replication to deletion? 

Is there any other meaning, choosing "oldestHeartbeatStorage" first?

 

  public DatanodeStorageInfo chooseReplicaToDelete(

      Collection<DatanodeStorageInfo> moreThanOne,

      Collection<DatanodeStorageInfo> exactlyOne,

      final List<StorageType> excessTypes,

      Map<String, List<DatanodeStorageInfo>> rackMap) {

    ......

    final DatanodeStorageInfo storage;

    if (minSpaceStorage != null) {

      storage = minSpaceStorage;

    } else if (oldestHeartbeatStorage != null) {

      storage = oldestHeartbeatStorage;

    } else {

      return null;

    }

    excessTypes.remove(storage.getStorageType());

    return storage;

  }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org