pbacsko commented on code in PR #727:
URL: https://github.com/apache/yunikorn-core/pull/727#discussion_r1402918076
##########
pkg/scheduler/objects/application_events.go:
##########
@@ -35,11 +36,11 @@ type applicationEvents struct {
limiter *rate.Limiter
}
-func (evt *applicationEvents) sendAppDoesNotFitEvent(request *AllocationAsk) {
+func (evt *applicationEvents) sendAppDoesNotFitEvent(request *AllocationAsk,
headroom *resources.Resource) {
if !evt.eventSystem.IsEventTrackingEnabled() || !evt.limiter.Allow() {
return
}
- message := fmt.Sprintf("Application %s does not fit into %s queue",
request.GetApplicationID(), evt.app.queuePath)
+ message := fmt.Sprintf("Application %s does not fit into %s queue,
request resoure %s can't fit headroom %s", request.GetApplicationID(),
evt.app.queuePath, request.GetAllocatedResource().String(), headroom.String())
Review Comment:
Minor nit no.1: calling String() is not needed, fmt.Sprintf() can recognize
the Stringer interface.
Minor nit no.2: slight rewording: "Application %s does not fit into %s queue
(request resoure %s, headroom %s)". The proposed message sounds like two
separate problems.
--
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]