pbacsko commented on code in PR #1000:
URL: https://github.com/apache/yunikorn-core/pull/1000#discussion_r1856675783


##########
pkg/scheduler/objects/events/application_events.go:
##########
@@ -79,6 +79,14 @@ func (ae *ApplicationEvents) 
SendRemoveAllocationEvent(appID, allocKey string, a
        ae.eventSystem.AddEvent(event)
 }
 
+func (ae *ApplicationEvents) SendPreemptAllocationEvent(appID, allocKey 
string, allocated *resources.Resource, message string) {
+       if !ae.eventSystem.IsEventTrackingEnabled() {
+               return
+       }
+       event := events.CreateAppEventRecord(appID, message, allocKey, 
si.EventRecord_REMOVE, si.EventRecord_ALLOC_PREEMPT, allocated)

Review Comment:
   This must be a type of `REQUEST`. That will result in a real K8s event being 
sent to the target pod.
   
   The removal of the allocation will be a natural consequence of that, which 
will flow through the scheduler, so an app-specific event is not needed here.



-- 
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]

Reply via email to