Added proactive cluster wide capping with ranked tasks as another scheduler.
This commit is contained in:
parent
81d795f197
commit
72bd54374c
1 changed files with 9 additions and 9 deletions
|
@ -114,10 +114,10 @@ func (s *ProactiveClusterwideCapRanked) newTask(offer *mesos.Offer, task def.Tas
|
||||||
task.SetTaskID(*proto.String("electron-" + taskName))
|
task.SetTaskID(*proto.String("electron-" + taskName))
|
||||||
// Add task to the list of tasks running on the node.
|
// Add task to the list of tasks running on the node.
|
||||||
s.running[offer.GetSlaveId().GoString()][taskName] = true
|
s.running[offer.GetSlaveId().GoString()][taskName] = true
|
||||||
if len(s.taskMonitor[offer.GetSlaveId().GoString()]) == 0 {
|
if len(s.taskMonitor[*offer.Hostname]) == 0 {
|
||||||
s.taskMonitor[offer.GetSlaveId().GoString()] = []def.Task{task}
|
s.taskMonitor[*offer.Hostname] = []def.Task{task}
|
||||||
} else {
|
} else {
|
||||||
s.taskMonitor[offer.GetSlaveId().GoString()] = append(s.taskMonitor[offer.GetSlaveId().GoString()], task)
|
s.taskMonitor[*offer.Hostname] = append(s.taskMonitor[*offer.Hostname], task)
|
||||||
}
|
}
|
||||||
|
|
||||||
resources := []*mesos.Resource{
|
resources := []*mesos.Resource{
|
||||||
|
|
Reference in a new issue