From 154bacdf7fc0eb0fdeb9774de8d7971f6db00622 Mon Sep 17 00:00:00 2001 From: Pradyumna Kaushik Date: Fri, 6 Jan 2017 21:05:56 -0800 Subject: [PATCH] Added missing line -- Add task to list of running tasks --- schedulers/bpswClassMapWattsPistonCapping.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/schedulers/bpswClassMapWattsPistonCapping.go b/schedulers/bpswClassMapWattsPistonCapping.go index 9f725e4..20c5e61 100644 --- a/schedulers/bpswClassMapWattsPistonCapping.go +++ b/schedulers/bpswClassMapWattsPistonCapping.go @@ -104,6 +104,9 @@ func (s *BPSWClassMapWattsPistonCapping) newTask(offer *mesos.Offer, task def.Ta s.running[offer.GetSlaveId().GoString()] = make(map[string]bool) } + // Add task to list of tasks running on node + s.running[offer.GetSlaveId().GoString()][taskName] = true + // Setting the task ID to the task. This is done so that we can consider each task to be different // even though they have the same parameters. task.SetTaskID(*proto.String("electron-" + taskName)) @@ -155,7 +158,7 @@ func (s *BPSWClassMapWattsPistonCapping) Disconnected(sched.SchedulerDriver) { // mutex var bpswClassMapWattsPistonMutex sync.Mutex -// go routine to cap eahc node in the cluster at regular intervals of time +// go routine to cap each node in the cluster at regular intervals of time var bpswClassMapWattsPistonCapValues = make(map[string]float64) // Storing the previous cap value for each host so as to not repeatedly cap the nodes to the same value. (reduces overhead)