sky76093016 commented on a change in pull request #2757:
URL: https://github.com/apache/ozone/pull/2757#discussion_r736243215
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelinePlacementPolicy.java
##########
@@ -376,8 +378,7 @@ public DatanodeDetails chooseNode(final
List<DatanodeDetails> healthyNodes) {
if (healthyNodes == null || healthyNodes.isEmpty()) {
return null;
}
- DatanodeDetails selectedNode =
- healthyNodes.get(getRand().nextInt(healthyNodes.size()));
+ DatanodeDetails selectedNode = healthyNodes.get(0);
Review comment:
Thanks @rakeshadr for reviewing it.
The
[LIST](https://github.com/apache/ozone/blob/c5aaad8cdef758a0028e2be11ce0aea47b09011d/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelinePlacementPolicy.java#L163)
before `getRand().next(healthyNodes.size()` is sorted by "LOAD". If you use
the existing `getRand().next(healthyNodes.size())`, the existing sorting will
be destroyed.
--
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]