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
|
// 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 {
|
for *task.Instances > 0 {
|
||||||
// Does the task fit
|
// Does the task fit
|
||||||
|
|
|
@ -34,14 +34,14 @@ func (s *BPSWMaxMinWatts) takeOffer(offer *mesos.Offer, task def.Task) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
type BPSWMaxMinWatts struct {
|
type BPSWMaxMinWatts struct {
|
||||||
base //Type embedding to inherit common functions
|
base //Type embedding to inherit common functions
|
||||||
tasksCreated int
|
tasksCreated int
|
||||||
tasksRunning int
|
tasksRunning int
|
||||||
tasks []def.Task
|
tasks []def.Task
|
||||||
metrics map[string]def.Metric
|
metrics map[string]def.Metric
|
||||||
running map[string]map[string]bool
|
running map[string]map[string]bool
|
||||||
wattsAsAResource bool
|
wattsAsAResource bool
|
||||||
classMapWatts bool
|
classMapWatts bool
|
||||||
|
|
||||||
// First set of PCP values are garbage values, signal to logger to start recording when we're
|
// First set of PCP values are garbage values, signal to logger to start recording when we're
|
||||||
// about to schedule a new task
|
// about to schedule a new task
|
||||||
|
@ -70,15 +70,15 @@ func NewBPMaxMinWatts(tasks []def.Task, wattsAsAResource bool, schedTracePrefix
|
||||||
}
|
}
|
||||||
|
|
||||||
s := &BPSWMaxMinWatts{
|
s := &BPSWMaxMinWatts{
|
||||||
tasks: tasks,
|
tasks: tasks,
|
||||||
wattsAsAResource: wattsAsAResource,
|
wattsAsAResource: wattsAsAResource,
|
||||||
classMapWatts: classMapWatts,
|
classMapWatts: classMapWatts,
|
||||||
Shutdown: make(chan struct{}),
|
Shutdown: make(chan struct{}),
|
||||||
Done: make(chan struct{}),
|
Done: make(chan struct{}),
|
||||||
PCPLog: make(chan struct{}),
|
PCPLog: make(chan struct{}),
|
||||||
running: make(map[string]map[string]bool),
|
running: make(map[string]map[string]bool),
|
||||||
RecordPCP: false,
|
RecordPCP: false,
|
||||||
schedTrace: log.New(logFile, "", log.LstdFlags),
|
schedTrace: log.New(logFile, "", log.LstdFlags),
|
||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package schedulers
|
package schedulers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bitbucket.org/sunybingcloud/electron/constants"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"bitbucket.org/sunybingcloud/electron/constants"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func coLocated(tasks map[string]bool) {
|
func coLocated(tasks map[string]bool) {
|
||||||
|
@ -24,4 +24,3 @@ func hostToPowerClass(hostName string) string {
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,4 +45,3 @@ func OrderedKeys(plist PairList) ([]string, error) {
|
||||||
}
|
}
|
||||||
return orderedKeys, nil
|
return orderedKeys, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue