chia7712 commented on code in PR #872:
URL: https://github.com/apache/yunikorn-core/pull/872#discussion_r1612186724
##########
pkg/scheduler/partition.go:
##########
@@ -339,13 +339,18 @@ func (pc *PartitionContext) AddApplication(app
*objects.Application) error {
return fmt.Errorf("failed to find queue %s for application %s",
queueName, appID)
}
- // set resources based on tags, but only if the queue is dynamic
(unmanaged)
- if queue.IsManaged() {
- log.Log(log.SchedQueue).Warn("Trying to set resources on a
queue that is not an unmanaged leaf",
- zap.String("queueName", queue.QueuePath))
- } else {
- queue.SetResources(app.GetGuaranteedResource(),
app.GetMaxResource())
+ guaranteedRes := app.GetGuaranteedResource()
+ maxRes := app.GetMaxResource()
+ if guaranteedRes != nil || maxRes != nil {
+ // set resources based on tags, but only if the queue is
dynamic (unmanaged)
+ if queue.IsManaged() {
+ log.Log(log.SchedQueue).Warn("Trying to set resources
on a queue that is not an unmanaged leaf",
+ zap.String("queueName", queue.QueuePath))
+ } else {
+ queue.SetResources(guaranteedRes, maxRes)
Review Comment:
This is unrelated to this PR, but what happens if this dynamic queue is
`@recovery@` queue? IIRC, recovery queue has no quota
--
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]