fairness

package
v0.20.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DominantResourceFairness

type DominantResourceFairness struct {
	// contains filtered or unexported fields
}

func NewDominantResourceFairness

func NewDominantResourceFairness(totalResources internaltypes.ResourceList, pool string, config configuration.SchedulingConfig) (*DominantResourceFairness, error)

func (*DominantResourceFairness) UnweightedCostFromAllocation

func (f *DominantResourceFairness) UnweightedCostFromAllocation(allocation internaltypes.ResourceList) float64

func (*DominantResourceFairness) WeightedCostFromAllocation

func (f *DominantResourceFairness) WeightedCostFromAllocation(allocation internaltypes.ResourceList, weight float64) float64

type FairnessCostProvider

type FairnessCostProvider interface {
	UnweightedCostFromAllocation(allocation internaltypes.ResourceList) float64
	WeightedCostFromAllocation(allocation internaltypes.ResourceList, weight float64) float64
}

FairnessCostProvider captures algorithms to compute the cost of an allocation.

type Queue

type Queue interface {
	// GetAllocation returns the current allocation of the queue.
	GetAllocation() internaltypes.ResourceList
	// GetAllocationInclShortJobPenalty returns the value of GetAllocation above plus any short job penalty
	GetAllocationInclShortJobPenalty() internaltypes.ResourceList
	// Determines the fair share of this queue relative to other queues.
	GetWeight() float64
}

Queue is a minimal representation of a queue used for computing fairness.

type QueueRepository

type QueueRepository interface {
	GetQueue(name string) (Queue, bool)
}

QueueRepository is a minimal representation of a queue repository used for computing fairness.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL