You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Hexiaoqiao (via GitHub)" <gi...@apache.org> on 2023/06/26 03:16:05 UTC

[GitHub] [hadoop] Hexiaoqiao commented on a diff in pull request #5778: HDFS-17060. BlockPlacementPolicyDefault#chooseReplicaToDelete should consider datanode load.

Hexiaoqiao commented on code in PR #5778:
URL: https://github.com/apache/hadoop/pull/5778#discussion_r1241465734


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java:
##########
@@ -1236,11 +1245,17 @@ public DatanodeStorageInfo chooseReplicaToDelete(
         minSpace = free;
         minSpaceStorage = storage;
       }
+      if (considerLoad2chooseReplicaDeleting && nodeLoad < minLoad) {
+        minLoad = nodeLoad;
+        minLoadStorage = storage;
+      }
     }
 
     final DatanodeStorageInfo storage;
     if (oldestHeartbeatStorage != null) {
       storage = oldestHeartbeatStorage;
+    } else if (minLoadStorage != null) {

Review Comment:
   Good idea to involve load when delete extra replicas. I wonder why we consider load first AND How to trade-offer load vs space? Thanks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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