[ https://issues.apache.org/jira/browse/HDFS-15658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
chuanjie.duan updated HDFS-15658: --------------------------------- Attachment: HDFS-15658-branch-2.7.patch Status: Patch Available (was: Open) > 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 > Priority: Major > Attachments: HDFS-15658-branch-2.7.patch > > > 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-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org