sodonnel commented on code in PR #3606:
URL: https://github.com/apache/ozone/pull/3606#discussion_r925546946
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/SCMCommonPlacementPolicy.java:
##########
@@ -126,7 +127,36 @@ public ConfigurationSource getConf() {
* @throws SCMException SCM exception.
*/
@Override
- public List<DatanodeDetails> chooseDatanodes(
+ public final List<DatanodeDetails> chooseDatanodes(
+ List<DatanodeDetails> excludedNodes,
+ List<DatanodeDetails> favoredNodes,
+ int nodesRequired, long metadataSizeRequired, long dataSizeRequired)
+ throws SCMException {
+// This method calls the chooseDatanodeInternal after fixing
Review Comment:
Expand this comment a bit, and also mention this Jira in it please. Eg:
> The nodes in the exclude list are created from the ExcludeList passed from
the client. It contains only the DN UUID to exclude and does not include the
network location. In order for the node choosing code to work correctly, it
needs to know the network location (rack) the node is associated with.
Therefore we lookup each excluded node in the NodeManager by its UUID, and if
found, use the datanodeDetails instance stored inside NodeManager. If no node
is found in NM, then it means SCM does know know about this node, so there is
no point in passing it into the downstream methods and it can be filtered out.
See HDDS-7015.
--
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]