pbacsko commented on code in PR #458:
URL: https://github.com/apache/yunikorn-core/pull/458#discussion_r1037164724
##########
pkg/scheduler/objects/allocation_ask.go:
##########
@@ -245,3 +247,31 @@ func (aa *AllocationAsk) GetAllocationLog()
[]*AllocationLogEntry {
}
return res
}
+
+// SetTriggeredPreemption sets whether preemption has been triggered for this
ask
+func (aa *AllocationAsk) SetTriggeredPreemption(triggered bool) {
+ aa.Lock()
+ defer aa.Unlock()
+ aa.preemptionTriggered = triggered
+}
+
+// HasTriggeredPreemption returns whether this ask has triggered preemption
+func (aa *AllocationAsk) HasTriggeredPreemption() bool {
+ aa.RLock()
+ defer aa.RUnlock()
+ return aa.preemptionTriggered
+}
+
+// SetLastPreemptionAttempt sets the time which tells when the last preemption
attempt was performed for this ask.
+func (aa *AllocationAsk) SetLastPreemptionAttempt(attempt time.Time) {
Review Comment:
Removed.
--
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]