umamaheswararao commented on code in PR #3462:
URL: https://github.com/apache/ozone/pull/3462#discussion_r883754671


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/SCMContainerPlacementRackScatter.java:
##########
@@ -98,6 +98,7 @@ public List<DatanodeDetails> chooseDatanodes(
       throws SCMException {
     Preconditions.checkArgument(nodesRequired > 0);
     metrics.incrDatanodeRequestCount(nodesRequired);

Review Comment:
   I think the changes looks good to me.
   To keep the better practice: How about we make all the passed params final. 
And have a separate counter before while loop?
   
   int nodesRequiredToChoose = nodesRequired;
   while (nodesRequiredToChoose > 0) {
   



-- 
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]

Reply via email to