xiaoyuyao commented on a change in pull request #1194: HDDS-1879. Support
multiple excluded scopes when choosing datanodes in NetworkTopology
URL: https://github.com/apache/hadoop/pull/1194#discussion_r319611648
##########
File path:
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NetworkTopologyImpl.java
##########
@@ -556,17 +571,17 @@ private Node chooseNodeInternal(String scope, int
leafIndex,
int nodeIndex;
if (leafIndex >= 0) {
nodeIndex = leafIndex % availableNodes;
- ret = ((InnerNode)scopeNode).getLeaf(nodeIndex, excludedScope,
+ ret = ((InnerNode)scopeNode).getLeaf(nodeIndex, mutableExcludedScopes,
mutableExNodes, ancestorGen);
} else {
nodeIndex = ThreadLocalRandom.current().nextInt(availableNodes);
- ret = ((InnerNode)scopeNode).getLeaf(nodeIndex, excludedScope,
+ ret = ((InnerNode)scopeNode).getLeaf(nodeIndex, mutableExcludedScopes,
mutableExNodes, ancestorGen);
}
LOG.debug("Choosing node[index={},random={}] from \"{}\" available nodes" +
" scope=\"{}\", excludedScope=\"{}\", excludeNodes=\"{}\".",
Review comment:
same as above.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]