used sort interface instead of the quickSort algorithm to sort tasks in ascending order of watts.
This commit is contained in:
parent
d69c5006ed
commit
c493bd066e
1 changed files with 2 additions and 1 deletions
|
@ -21,6 +21,7 @@ import (
|
|||
sched "github.com/mesos/mesos-go/scheduler"
|
||||
"log"
|
||||
"math"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
@ -263,7 +264,7 @@ func (s *ProactiveClusterwideCapRanked) ResourceOffers(driver sched.SchedulerDri
|
|||
|
||||
// sorting the tasks in ascending order of watts.
|
||||
if (len(s.tasks) > 0) {
|
||||
s.capper.sortTasks(&s.tasks)
|
||||
sort.Sort(def.WattsSorter(s.tasks))
|
||||
// calculating the total number of tasks ranked.
|
||||
numberOfRankedTasks := 0
|
||||
for _, task := range s.tasks {
|
||||
|
|
Reference in a new issue