Documentation
¶
Index ¶
Constants ¶
const ( GangUniformityLabelIsNotIndexedUnschedulableReason = "uniformity label is not indexed" GangNoNodesWithUniformityLabelUnschedulableReason = "no nodes with uniformity label" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GangPricer ¶
type GangPricer struct {
// contains filtered or unexported fields
}
func NewGangPricer ¶
func NewGangPricer( nodeScheduler NodeScheduler, jobDb jobdb.JobRepository, nodeDb *nodedb.NodeDb, ) *GangPricer
func (*GangPricer) Price ¶
func (gp *GangPricer) Price(gctx *context.GangSchedulingContext) (GangPricingResult, error)
Price determines the lowest price across all nodes at which the provided gang can be scheduled at. This method has no side effects and utilises the state provided at GangPricer instantiation.
type GangPricingResult ¶
type MinPriceNodeScheduler ¶
type MinPriceNodeScheduler struct {
// contains filtered or unexported fields
}
func NewMinPriceNodeScheduler ¶
func NewMinPriceNodeScheduler(jobDb jobdb.JobRepository) *MinPriceNodeScheduler
func (*MinPriceNodeScheduler) Schedule ¶
func (n *MinPriceNodeScheduler) Schedule(jctx *context.JobSchedulingContext, node *internaltypes.Node, protectedJobIds set.Set[string]) (*NodeSchedulingResult, error)
Schedule This function is responsible for determining if a job can be scheduled on a node, and the minimum price at which this can be achieved High level steps: - Determine all the jobs that can be preempted - Order these jobs by cost ascending - Attempt to schedule the new job on the node, preempting one job at a time until the job fits - Return NodeSchedulingResult, which is a summary of how the given job could be scheduled on the given node, including whether it's even possible
type NodeScheduler ¶
type NodeScheduler interface {
Schedule(*context.JobSchedulingContext, *internaltypes.Node, set.Set[string]) (*NodeSchedulingResult, error)
}
type NodeSchedulingResult ¶
type NodeSchedulingResult struct {
// contains filtered or unexported fields
}