chenyulin0719 commented on code in PR #1009:
URL: https://github.com/apache/yunikorn-core/pull/1009#discussion_r1960078990
##########
pkg/scheduler/partition.go:
##########
@@ -115,38 +116,45 @@ func (pc *PartitionContext)
initialPartitionFromConfig(conf configs.PartitionCon
// Add the rest of the queue structure recursively
queueConf := conf.Queues[0]
var err error
- if pc.root, err = objects.NewConfiguredQueue(queueConf, nil); err !=
nil {
+ if pc.root, err = objects.NewConfiguredQueue(queueConf, nil, silence);
err != nil {
return err
}
// recursively add the queues to the root
- if err = pc.addQueue(queueConf.Queues, pc.root); err != nil {
+ if err = pc.addQueue(queueConf.Queues, pc.root, silence); err != nil {
return err
}
- log.Log(log.SchedPartition).Info("root queue added",
- zap.String("partitionName", pc.Name),
- zap.String("rmID", pc.RmID))
+
+ if !silence {
+ log.Log(log.SchedPartition).Info("root queue added",
+ zap.String("partitionName", pc.Name),
+ zap.String("rmID", pc.RmID))
+ }
// We need to pass in the locked version of the GetQueue function.
// Placing an application will not have a lock on the partition context.
- pc.placementManager =
placement.NewPlacementManager(conf.PlacementRules, pc.GetQueue)
+ pc.placementManager =
placement.NewPlacementManager(conf.PlacementRules, pc.GetQueue, silence)
// get the user group cache for the partition
pc.userGroupCache = security.GetUserGroupCache("")
- pc.updateNodeSortingPolicy(conf)
+ pc.updateNodeSortingPolicy(conf, silence)
pc.updatePreemption(conf)
// update limit settings: start at the root
- return ugm.GetUserManager().UpdateConfig(queueConf, conf.Queues[0].Name)
+ if !silence {
+ return ugm.GetUserManager().UpdateConfig(queueConf,
conf.Queues[0].Name)
+ }
Review Comment:
@wilfred-s This change also fix the `unnecessarily ugm reload` issue which
you mentioned in Jira.
@kousei47747 I think we don't need another Jira. Does it sound right to you?
--
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]