Skip to content

Commit

Permalink
[YUNIKORN-2077] Cleanup scheduler event interface in shim (#704)
Browse files Browse the repository at this point in the history
Closes: #704

Signed-off-by: Craig Condit <ccondit@apache.org>
  • Loading branch information
chenyulin0719 authored and craigcondit committed Oct 26, 2023
1 parent 206f427 commit 2eebc3a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/shim/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func main() {
if serviceContext.RMProxy != nil {
ss := shim.NewShimScheduler(serviceContext.RMProxy, conf.GetSchedulerConf(), configMaps)
if err := ss.Run(); err != nil {
log.Log(log.Shim).Fatal("Unable tto start scheduler", zap.Error(err))
log.Log(log.Shim).Fatal("Unable to start scheduler", zap.Error(err))
}

signalChan := make(chan os.Signal, 1)
Expand Down
12 changes: 0 additions & 12 deletions pkg/common/events/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,6 @@ type TaskEvent interface {
GetArgs() []interface{}
}

// --------------------------------------
// scheduler events
// --------------------------------------
type SchedulerEvent interface {
// the type of this event
GetEvent() string

// an event can have multiple arguments, these arguments will be passed to
// state machines' callbacks when doing state transition
GetArgs() []interface{}
}

// --------------------------------------
// scheduler node events
// --------------------------------------
Expand Down
3 changes: 0 additions & 3 deletions pkg/dispatcher/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const (
EventTypeApp EventType = iota
EventTypeTask
EventTypeNode
EventTypeScheduler
)

var (
Expand Down Expand Up @@ -194,8 +193,6 @@ func Start() {
getEventHandler(EventTypeApp)(v)
case events.SchedulerNodeEvent:
getEventHandler(EventTypeNode)(v)
case events.SchedulerEvent:
getEventHandler(EventTypeScheduler)(v)
default:
log.Log(log.ShimDispatcher).Fatal("unsupported event",
zap.Any("event", v))
Expand Down

0 comments on commit 2eebc3a

Please sign in to comment.