Made classMapWatts a commandLine option where one can enable and disable mapping of watts to powerclasses when accepting offers from Mesos. Removed the schedulers that were created solely for the classMapWatts feature. Retrofitted all schedulers to use the powerClass mapped watts attribute for a task, if classMapWatts has been enabled. Removed unnecessary functions and variables from constants.go. Removed unnecessary functions from utilities/utils.go. Fixed operator precendence issue with takeOffer(...) in some of the schedulers. Added TODO to decouple capping strategies from the schedulers completely. Added TODO to move all the common struct attributes in the schedulers into base.go.
This commit is contained in:
parent
a2b50dd313
commit
fdcb401447
28 changed files with 686 additions and 2094 deletions
|
@ -2,6 +2,8 @@
|
|||
Cluster wide dynamic capping
|
||||
|
||||
This is a capping strategy that can be used with schedulers to improve the power consumption.
|
||||
|
||||
Note: This capping strategy doesn't currently considered task.Watts to power class mapping with classMapWatts is enabled.
|
||||
*/
|
||||
package powerCapping
|
||||
|
||||
|
@ -244,8 +246,7 @@ func (capper ClusterwideCapper) TaskFinished(taskID string) {
|
|||
}
|
||||
|
||||
// First come first serve scheduling.
|
||||
func (capper ClusterwideCapper) FCFSDeterminedCap(totalPower map[string]float64,
|
||||
newTask *def.Task) (float64, error) {
|
||||
func (capper ClusterwideCapper) FCFSDeterminedCap(totalPower map[string]float64, newTask *def.Task) (float64, error) {
|
||||
// Validation
|
||||
if totalPower == nil {
|
||||
return 100, errors.New("Invalid argument: totalPower")
|
||||
|
|
Reference in a new issue