Skip to content

Commit

Permalink
[YUNIKORN-2052] Logging Enhancement for Preemption (apache#678)
Browse files Browse the repository at this point in the history
Closes: apache#678

Signed-off-by: Manikandan R <[email protected]>
  • Loading branch information
rrajesh-cloudera authored and manirajv06 committed Oct 20, 2023
1 parent 46ad05a commit efc21e0
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions pkg/scheduler/objects/preemption.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,14 +548,20 @@ func (p *Preemptor) TryPreemption() (*Allocation, bool) {
victimQueue.IncPreemptingResource(victim.GetAllocatedResource())
victim.MarkPreempted()
log.Log(log.SchedPreemption).Info("Preempting task",
zap.String("applicationID", victim.GetApplicationID()),
zap.String("allocationKey", victim.GetAllocationKey()),
zap.String("nodeID", victim.GetNodeID()),
zap.Stringer("resources", victim.GetAllocatedResource()))
zap.String("askApplicationID", p.ask.applicationID),
zap.String("askAllocationKey", p.ask.allocationKey),
zap.String("askQueue", p.queue.Name),
zap.String("victimApplicationID", victim.GetApplicationID()),
zap.String("victimAllocationKey", victim.GetAllocationKey()),
zap.Stringer("victimAllocatedResource", victim.GetAllocatedResource()),
zap.String("victimNodeID", victim.GetNodeID()),
zap.String("victimQueue", victimQueue.Name),
)
} else {
log.Log(log.SchedPreemption).Warn("BUG: Queue not found for preemption victim",
zap.String("applicationID", victim.GetApplicationID()),
zap.String("allocationKey", victim.GetAllocationKey()))
zap.String("queue", p.queue.Name),
zap.String("victimApplicationID", victim.GetApplicationID()),
zap.String("victimAllocationKey", victim.GetAllocationKey()))
}
}

Expand Down

0 comments on commit efc21e0

Please sign in to comment.