pbacsko commented on code in PR #838:
URL: https://github.com/apache/yunikorn-core/pull/838#discussion_r1566561651
##########
pkg/scheduler/partition.go:
##########
@@ -339,26 +339,28 @@ func (pc *PartitionContext) AddApplication(app
*objects.Application) error {
return fmt.Errorf("failed to find queue %s for application %s",
queueName, appID)
}
- // add the app to the queue to set the quota on the queue if needed
- queue.AddApplication(app)
// check only for gang request
// - make sure the taskgroup request fits in the maximum set for the
queue hierarchy
// - task groups should only be used in FIFO queues
// if the check fails remove the app from the queue again
if placeHolder := app.GetPlaceholderAsk();
!resources.IsZero(placeHolder) {
// check the queue sorting
if !queue.SupportTaskGroup() {
- queue.RemoveApplication(app)
return fmt.Errorf("queue %s cannot run application %s
with task group request: unsupported sort type", queueName, appID)
}
- // retrieve the max set
- if maxQueue := queue.GetMaxQueueSet(); maxQueue != nil {
+ // the new maxResource is going to be either
app.GetMaxResource() from the tags or the maxResource which already set on the
queue
+ maxRes := queue.GetMaxResource()
+ if app.GetMaxResource() != nil {
Review Comment:
This will be completely rewritten. In fact, this part will be restored
because max/guaranteed must be set regardless of whether the application can be
accepted or not.
--
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]