[ https://issues.apache.org/jira/browse/HDFS-15255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17076423#comment-17076423 ]
Lisheng Sun commented on HDFS-15255: ------------------------------------ If the last one overwrite the before one. According to the original code,Collections.shuffle(list) is also overwrited. {code:java} private Consumer<List<DatanodeInfoWithStorage>> createSecondaryNodeSorter() { Consumer<List<DatanodeInfoWithStorage>> secondarySort = list -> Collections.shuffle(list); if (readConsiderLoad) { Comparator<DatanodeInfoWithStorage> comp = Comparator.comparingInt(DatanodeInfo::getXceiverCount); secondarySort = list -> Collections.sort(list, comp); } return secondarySort; } {code} So the last one does not overwrite the before ones. > Consider StorageType when DatanodeManager#sortLocatedBlock() > ------------------------------------------------------------ > > Key: HDFS-15255 > URL: https://issues.apache.org/jira/browse/HDFS-15255 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Lisheng Sun > Assignee: Lisheng Sun > Priority: Major > Attachments: HDFS-15255.001.patch, HDFS-15255.002.patch > > > When only one replica of a block is SDD, the others are HDD. > When the client reads the data, the current logic is that it considers the > distance between the client and the dn. I think it should also consider the > StorageType of the replica. Priority to return a replica of the specified > StorageType -- 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