Skip to content

Commit

Permalink
[YUNIKORN-2654] Remove unused code in k8shim context
Browse files Browse the repository at this point in the history
Closes: apache#854

Signed-off-by: Peter Bacsko <pbacsko@cloudera.com>
  • Loading branch information
0lai0 authored and pbacsko committed Jun 4, 2024
1 parent 3ce745e commit 36111c4
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions pkg/cache/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -904,29 +904,6 @@ func (ctx *Context) StartPodAllocation(podKey string, nodeID string) bool {
return ctx.schedulerCache.StartPodAllocation(podKey, nodeID)
}

// inform the scheduler that the application is completed,
// the complete state may further explained to completed_with_errors(failed) or successfully_completed,
// either way we need to release all allocations (if exists) for this application
func (ctx *Context) NotifyApplicationComplete(appID string) {
if app := ctx.GetApplication(appID); app != nil {
log.Log(log.ShimContext).Debug("NotifyApplicationComplete",
zap.String("appID", appID),
zap.String("currentAppState", app.GetApplicationState()))
ev := NewSimpleApplicationEvent(appID, CompleteApplication)
dispatcher.Dispatch(ev)
}
}

func (ctx *Context) NotifyApplicationFail(appID string) {
if app := ctx.GetApplication(appID); app != nil {
log.Log(log.ShimContext).Debug("NotifyApplicationFail",
zap.String("appID", appID),
zap.String("currentAppState", app.GetApplicationState()))
ev := NewSimpleApplicationEvent(appID, FailApplication)
dispatcher.Dispatch(ev)
}
}

func (ctx *Context) NotifyTaskComplete(appID, taskID string) {
ctx.lock.Lock()
defer ctx.lock.Unlock()
Expand Down

0 comments on commit 36111c4

Please sign in to comment.