brandboat commented on code in PR #763:
URL: https://github.com/apache/yunikorn-core/pull/763#discussion_r1438617402
##########
pkg/common/configs/configvalidator.go:
##########
@@ -573,6 +573,19 @@ func checkLimit(limit Limit, existedUserName
map[string]bool, existedGroupName m
return nil
}
+func checkLimitsStructure(rootQueue *QueueConfig, partitionLimits []Limit)
error {
+ if len(partitionLimits) > 0 && len(rootQueue.Limits) > 0 {
+ return fmt.Errorf("partition limits and root queue limits both
exist")
+ }
+
+ // if root queue limits not defined, apply partition limits
+ if len(partitionLimits) > 0 && len(rootQueue.Limits) == 0 {
Review Comment:
`rootQueue` will always be the root, as `checkLimitsStructure` will be
triggered after `checkQueuesStructure`, and `checkQueuesStructure` will ensure
that the root element in queues is the root queue.
https://github.com/apache/yunikorn-core/blob/526a8db4b61c0db48a3fa6a41c9f4d59481862e7/pkg/common/configs/configvalidator.go#L662-L667
--
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]