F64116045 commented on code in PR #11981:
URL: https://github.com/apache/ozone/pull/11981#discussion_r4578727850
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/SCMContainerPlacementRackAware.java:
##########
@@ -120,11 +122,11 @@ protected List<DatanodeDetails> chooseDatanodesInternal(
int datanodeCount = networkTopology.getNumOfLeafNode(NetConstants.ROOT);
int excludedNodesCount = excludedNodes == null ? 0 : excludedNodes.size();
int usedNodesCount = usedNodes == null ? 0 : usedNodes.size();
- if (datanodeCount < nodesRequired + excludedNodesCount + usedNodesCount) {
- throw new SCMException("No enough datanodes to choose. " +
- "TotalNode = " + datanodeCount + " RequiredNode = " + nodesRequired +
- " ExcludedNode = " + excludedNodesCount +
- " UsedNode = " + usedNodesCount, null);
+ int unavailableNodesCount = countUnavailableNodes(usedNodes,
excludedNodes);
+ if (datanodeCount < nodesRequired + unavailableNodesCount) {
+ throw new SCMException("Not enough datanodes to choose. TotalNode = " +
datanodeCount +
Review Comment:
thanks for checking.
> So it's better to fix them all separately.
opened HDDS-17816 for this.
--
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]