formatted files
This commit is contained in:
parent
ec78480067
commit
13479e03a4
4 changed files with 21 additions and 21 deletions
|
@ -279,7 +279,9 @@ func (s *BinPackedPistonCapper) ResourceOffers(driver sched.SchedulerDriver, off
|
|||
}
|
||||
|
||||
// Don't take offer if it doesn't match our task's host requirement
|
||||
if offerUtils.HostMismatch(*offer.Hostname, task.Host) {continue}
|
||||
if offerUtils.HostMismatch(*offer.Hostname, task.Host) {
|
||||
continue
|
||||
}
|
||||
|
||||
for *task.Instances > 0 {
|
||||
// Does the task fit
|
||||
|
|
|
@ -34,14 +34,14 @@ func (s *BPSWMaxMinWatts) takeOffer(offer *mesos.Offer, task def.Task) bool {
|
|||
}
|
||||
|
||||
type BPSWMaxMinWatts struct {
|
||||
base //Type embedding to inherit common functions
|
||||
tasksCreated int
|
||||
tasksRunning int
|
||||
tasks []def.Task
|
||||
metrics map[string]def.Metric
|
||||
running map[string]map[string]bool
|
||||
wattsAsAResource bool
|
||||
classMapWatts bool
|
||||
base //Type embedding to inherit common functions
|
||||
tasksCreated int
|
||||
tasksRunning int
|
||||
tasks []def.Task
|
||||
metrics map[string]def.Metric
|
||||
running map[string]map[string]bool
|
||||
wattsAsAResource bool
|
||||
classMapWatts bool
|
||||
|
||||
// First set of PCP values are garbage values, signal to logger to start recording when we're
|
||||
// about to schedule a new task
|
||||
|
@ -70,15 +70,15 @@ func NewBPMaxMinWatts(tasks []def.Task, wattsAsAResource bool, schedTracePrefix
|
|||
}
|
||||
|
||||
s := &BPSWMaxMinWatts{
|
||||
tasks: tasks,
|
||||
wattsAsAResource: wattsAsAResource,
|
||||
classMapWatts: classMapWatts,
|
||||
Shutdown: make(chan struct{}),
|
||||
Done: make(chan struct{}),
|
||||
PCPLog: make(chan struct{}),
|
||||
running: make(map[string]map[string]bool),
|
||||
RecordPCP: false,
|
||||
schedTrace: log.New(logFile, "", log.LstdFlags),
|
||||
tasks: tasks,
|
||||
wattsAsAResource: wattsAsAResource,
|
||||
classMapWatts: classMapWatts,
|
||||
Shutdown: make(chan struct{}),
|
||||
Done: make(chan struct{}),
|
||||
PCPLog: make(chan struct{}),
|
||||
running: make(map[string]map[string]bool),
|
||||
RecordPCP: false,
|
||||
schedTrace: log.New(logFile, "", log.LstdFlags),
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package schedulers
|
||||
|
||||
import (
|
||||
"bitbucket.org/sunybingcloud/electron/constants"
|
||||
"fmt"
|
||||
"log"
|
||||
"bitbucket.org/sunybingcloud/electron/constants"
|
||||
)
|
||||
|
||||
func coLocated(tasks map[string]bool) {
|
||||
|
@ -24,4 +24,3 @@ func hostToPowerClass(hostName string) string {
|
|||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
|
|
|
@ -45,4 +45,3 @@ func OrderedKeys(plist PairList) ([]string, error) {
|
|||
}
|
||||
return orderedKeys, nil
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue