From 13479e03a462fa9260e4287f0116f5311b226894 Mon Sep 17 00:00:00 2001 From: Pradyumna Kaushik Date: Sat, 11 Feb 2017 00:05:42 -0500 Subject: [PATCH] formatted files --- schedulers/binpackedpistoncapping.go | 4 +++- schedulers/bpswMaxMin.go | 34 ++++++++++++++-------------- schedulers/helpers.go | 3 +-- utilities/utils.go | 1 - 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/schedulers/binpackedpistoncapping.go b/schedulers/binpackedpistoncapping.go index 68f8448..e58f674 100644 --- a/schedulers/binpackedpistoncapping.go +++ b/schedulers/binpackedpistoncapping.go @@ -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 diff --git a/schedulers/bpswMaxMin.go b/schedulers/bpswMaxMin.go index bdb8f45..b98ab54 100644 --- a/schedulers/bpswMaxMin.go +++ b/schedulers/bpswMaxMin.go @@ -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 } diff --git a/schedulers/helpers.go b/schedulers/helpers.go index 23d1441..e6ba7fb 100644 --- a/schedulers/helpers.go +++ b/schedulers/helpers.go @@ -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 "" } - diff --git a/utilities/utils.go b/utilities/utils.go index 6662c59..18b2400 100644 --- a/utilities/utils.go +++ b/utilities/utils.go @@ -45,4 +45,3 @@ func OrderedKeys(plist PairList) ([]string, error) { } return orderedKeys, nil } -