onyx.scheduling.common-job-scheduler

actual-usage

(actual-usage replica jobs)

add-allocation-versions

(add-allocation-versions new old)
Adds version numbers to jobs whenever an allocation changes for that job.
This gives a measure of validity of messages and barriers that transit through the system.

add-messaging-short-ids

(add-messaging-short-ids replica)
Converts long form messaging identifies into short int identifiers, for
quick comparison and reduced message size.

anti-jitter-constraints

(anti-jitter-constraints replica jobs task-seq peer->vm task->node planned-capacities)
Reduces the amount of 'jitter' - that is unnecessary movement
from a peer between tasks. If the actual capacity is greater than
or equal to the planned capacity, we shouldn't reallocate the peers.
BtrPlace has a Fence constraint that lets us express just that.

assign-coordinators

(assign-coordinators {:keys [coordinators allocations], :as replica})

assign-task-resources

(assign-task-resources new-replica original-replica peer->task)

assign-task-slot-ids

(assign-task-slot-ids new-replica original peer->task)

btr-place-scheduling

(btr-place-scheduling replica jobs job-utilization capacities)

build-current-model

(build-current-model replica mapping task->node peer->vm)

build-job-and-task->node

(build-job-and-task->node model task-seq)

build-node->task

(build-node->task task->node)

build-peer->task

(build-peer->task result-model peer->vm node->task)

build-peer->vm

(build-peer->vm replica model)

calculate-capacity

(calculate-capacity replica task-capacities task->node [job-id task-id :as id])

capacity-constraints

(capacity-constraints replica job-utilization task-seq task->node planned-capacities)

change-peer-allocations

(change-peer-allocations replica peer->task)

claim-spare-peers

multimethod

constrainted-tasks-for-peer

(constrainted-tasks-for-peer replica jobs peer-tags)

deallocate-starved-jobs

(deallocate-starved-jobs replica)
Strips out allocations from jobs that no longer meet the minimum number
of peers. This can happen if a peer leaves from a running job.

full-allocation?

(full-allocation? replica utilization planned-capacities)

grouped-task?

(grouped-task? replica job-id task-id)

grouping-task-constraints

(grouping-task-constraints replica task-seq task->node peer->vm)

input-task?

(input-task? replica job-id task-id)

job->planned-task-capacity

(job->planned-task-capacity replica jobs-ids utilization)

job-claim-peers

(job-claim-peers replica job-offers)

job-coverable?

(job-coverable? replica job n)

job-lower-bound

(job-lower-bound replica job)

job-offer-n-peers

multimethod

job-upper-bound

(job-upper-bound replica job)

messaging-long-form

(messaging-long-form {:keys [allocations in->out], :as replica})

n-no-op-tasks

(n-no-op-tasks replica capacities task-seq)

n-qualified-peers

(n-qualified-peers replica peers job)

no-tagged-peers-constraints

(no-tagged-peers-constraints replica peers peer->vm task->node jobs no-op-node)

peer-running-constraints

(peer-running-constraints peer->vm)

reallocate-peers

(reallocate-peers replica)

reconfigure-cluster-workload

(reconfigure-cluster-workload new old)

remove-job

(remove-job replica job)

slot-ids

(slot-ids replica job-id task-id)

src-peers

(src-peers {:keys [allocations in->out input-tasks], :as replica} job task)

task-tagged-constraints

(task-tagged-constraints replica peers peer->vm task->node jobs no-op-node)

to-node-array

(to-node-array nodes)

unassign-task-slot-ids

(unassign-task-slot-ids new-replica original-replica peer->task)

unconstrained-tasks

(unconstrained-tasks replica jobs)

unrolled-tasks

(unrolled-tasks replica task-utilization)

update-peer-site

(update-peer-site replica job-id task-id peer-id)

update-slot-id-for-peer

(update-slot-id-for-peer replica job-id task-id peer-id)