(largest-remainder-allocations replica tasks n-peers job)
Allocates remaining peers to the tasks with the largest remainder. e.g. 3 tasks pct allocated 3.5, 1.75, 1.75 -> 3, 2, 2
Allocates remaining peers to the tasks with the largest remainder. e.g. 3 tasks pct allocated 3.5, 1.75, 1.75 -> 3, 2, 2
(percentage-balanced-taskload replica job candidate-tasks n-peers)
(reduce-overallocated-peers replica job-id planned-allocations)
Turns down the number of peers for tasks where we overallocated. This can happen if a grouping task is allocated a higher number of peers than its percentage value requests. Other tasks must give up peers to compensate. Tasks with the highest peer count are prioritized to be reduced first.
Turns down the number of peers for tasks where we overallocated. This can happen if a grouping task is allocated a higher number of peers than its percentage value requests. Other tasks must give up peers to compensate. Tasks with the highest peer count are prioritized to be reduced first.
(remove-grouping-tasks replica job-id allocations)
(rescale-task-percentages tasks)
Rescale task percentages after saturated tasks were removed
Rescale task percentages after saturated tasks were removed
(tasks-by-pct replica job tasks)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close