yakirgb commented on pull request #3559: URL: https://github.com/apache/hadoop/pull/3559#issuecomment-945053647
Just an idea, i think also `AvailableSpaceRackFaultTolerantBlockPlacementPolicy` with same issue and we can apply same fix: [AvailableSpaceRackFaultTolerantBlockPlacementPolicy.java](https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/AvailableSpaceRackFaultTolerantBlockPlacementPolicy.java#L121) ``` /** * Compare the two data nodes. */ protected int compareDataNode(final DatanodeDescriptor a, final DatanodeDescriptor b) { if (a.equals(b) || Math.abs(a.getDfsUsedPercent() - b.getDfsUsedPercent()) < 5) { return 0; } return a.getDfsUsedPercent() < b.getDfsUsedPercent() ? -1 : 1; } } ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
