Retrofitted all the schedulers to call UpdateEnvironment(..) function instead of the old named function i.e AddHostIfNew(..)

This commit is contained in:
Abhishek Jain 2017-03-25 18:06:39 -04:00
parent 8eddad4e17
commit e01c7b1b1d
15 changed files with 24 additions and 24 deletions

View file

@ -19,8 +19,8 @@ import (
/*
Tasks are categorized into small and large tasks based on the watts requirement.
All the large tasks are packed into offers from agents belonging to power class A and power class B, using BinPacking.
All the small tasks are spread among the offers from agents belonging to power class C and power class D, using FirstFit.
All the small tasks are packed into offers from agents belonging to power class C and power class D, using BinPacking.
All the large tasks are spread among the offers from agents belonging to power class A and power class B, using FirstFit.
This was done to give a little more room for the large tasks (power intensive) for execution and reduce the possibility of
starvation of power intensive tasks.
@ -281,7 +281,7 @@ func (s *TopHeavy) ResourceOffers(driver sched.SchedulerDriver, offers []*mesos.
offersLightPowerClasses := []*mesos.Offer{}
for _, offer := range offers {
offerUtils.AddHostIfNew(offer)
offerUtils.UpdateEnvironment(offer)
select {
case <-s.Shutdown:
log.Println("Done scheduling tasks: declining offer on [", offer.GetHostname(), "]")