Documentation ¶
Index ¶
- func CellEqual(c1 Cell, c2 Cell) bool
- func NewTopologyAwareScheduler(ccl ChainCellList, levelLeafCellNum map[CellLevel]int32, ...) *topologyAwareScheduler
- func ParseConfig(sConfig *api.Config) (physicalFullList map[CellChain]ChainCellList, ...)
- type AffinityGroupState
- type AlgoAffinityGroup
- type Cell
- type CellChain
- type CellLevel
- type CellList
- type CellPriority
- type CellState
- type ChainCellList
- type GenericCell
- func (c *GenericCell) AtOrHigherThanNode() bool
- func (c *GenericCell) GetAddress() api.CellAddress
- func (c *GenericCell) GetChain() CellChain
- func (c *GenericCell) GetChildren() CellList
- func (c *GenericCell) GetLevel() CellLevel
- func (c *GenericCell) GetParent() Cell
- func (c *GenericCell) GetPriority() CellPriority
- func (c *GenericCell) GetState() CellState
- func (c *GenericCell) GetTotalLeafCellNum() int32
- func (c *GenericCell) GetUsedLeafCellNumAtPriorities() map[CellPriority]int32
- func (c *GenericCell) IncreaseUsedLeafCellNumAtPriority(p CellPriority, delta int32)
- func (c *GenericCell) IsHealthy() bool
- func (c *GenericCell) SetParent(p Cell)
- type HivedAlgorithm
- func (h *HivedAlgorithm) AddAllocatedPod(pod *core.Pod)
- func (h *HivedAlgorithm) AddNode(node *core.Node)
- func (h *HivedAlgorithm) AddUnallocatedPod(*core.Pod)
- func (h *HivedAlgorithm) DeleteAllocatedPod(pod *core.Pod)
- func (h *HivedAlgorithm) DeleteNode(node *core.Node)
- func (h *HivedAlgorithm) DeleteUnallocatedPod(pod *core.Pod)
- func (h *HivedAlgorithm) GetAffinityGroup(name string) api.AffinityGroup
- func (h *HivedAlgorithm) GetAllAffinityGroups() api.AffinityGroupList
- func (h *HivedAlgorithm) GetAllVirtualClustersStatus() map[api.VirtualClusterName]api.VirtualClusterStatus
- func (h *HivedAlgorithm) GetClusterStatus() api.ClusterStatus
- func (h *HivedAlgorithm) GetPhysicalClusterStatus() api.PhysicalClusterStatus
- func (h *HivedAlgorithm) GetVirtualClusterStatus(vcn api.VirtualClusterName) api.VirtualClusterStatus
- func (h *HivedAlgorithm) Schedule(pod *core.Pod, suggestedNodes []string, phase internal.SchedulingPhase) internal.PodScheduleResult
- func (h *HivedAlgorithm) UpdateNode(oldNode, newNode *core.Node)
- type PhysicalCell
- func (c *PhysicalCell) AddReservingOrReservedGroup(g *AlgoAffinityGroup)
- func (c *PhysicalCell) AddUsingGroup(g *AlgoAffinityGroup)
- func (c *PhysicalCell) DeleteReservingOrReservedGroup(g *AlgoAffinityGroup)
- func (c *PhysicalCell) DeleteUsingGroup(g *AlgoAffinityGroup)
- func (c *PhysicalCell) GetAPIStatus() *api.PhysicalCellStatus
- func (c *PhysicalCell) GetPhysicalPlacement() ([]string, []int32)
- func (c *PhysicalCell) GetPhysicalPlacementString() string
- func (c *PhysicalCell) GetReservingOrReservedGroup() *AlgoAffinityGroup
- func (c *PhysicalCell) GetUsingGroup() *AlgoAffinityGroup
- func (c *PhysicalCell) GetVirtualCell() *VirtualCell
- func (c *PhysicalCell) IsPinned() bool
- func (c *PhysicalCell) IsSplit() bool
- func (c *PhysicalCell) SetChildren(children CellList)
- func (c *PhysicalCell) SetHealthiness(h api.CellHealthiness)
- func (c *PhysicalCell) SetPhysicalResources(nodes []string, leafCellIndices []int32)
- func (c *PhysicalCell) SetPinned(pinned bool)
- func (c *PhysicalCell) SetPriority(p CellPriority)
- func (c *PhysicalCell) SetSplit(split bool)
- func (c *PhysicalCell) SetState(s CellState)
- func (c *PhysicalCell) SetVirtualCell(cell *VirtualCell)
- type VirtualCell
- func (c *VirtualCell) GetAPIStatus() *api.VirtualCellStatus
- func (c *VirtualCell) GetPhysicalCell() *PhysicalCell
- func (c *VirtualCell) GetPreassignedCell() *VirtualCell
- func (c *VirtualCell) GetVirtualCluster() api.VirtualClusterName
- func (c *VirtualCell) SetChildren(children CellList)
- func (c *VirtualCell) SetPhysicalCell(cell *PhysicalCell)
- func (c *VirtualCell) SetPinnedCellId(pid api.PinnedCellId)
- func (c *VirtualCell) SetPreAssignedCell(cell *VirtualCell)
- func (c *VirtualCell) SetPriority(p CellPriority)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTopologyAwareScheduler ¶ added in v0.2.0
func NewTopologyAwareScheduler( ccl ChainCellList, levelLeafCellNum map[CellLevel]int32, crossPriorityPack bool) *topologyAwareScheduler
NewTopologyAwareScheduler initializes the scheduler by extracting node-level cells (lower-level if no node-level) from a free cell list.
func ParseConfig ¶
func ParseConfig(sConfig *api.Config) ( physicalFullList map[CellChain]ChainCellList, physicalFreeList map[CellChain]ChainCellList, vcFreeCellNum map[api.VirtualClusterName]map[CellChain]map[CellLevel]int32, virtualNonPinnedFullList map[api.VirtualClusterName]map[CellChain]ChainCellList, virtualNonPinnedFreeList map[api.VirtualClusterName]map[CellChain]ChainCellList, virtualPinnedCells map[api.VirtualClusterName]map[api.PinnedCellId]ChainCellList, physicalPinnedCells map[api.VirtualClusterName]map[api.PinnedCellId]*PhysicalCell, cellLevelToLeafCellNum map[CellChain]map[CellLevel]int32, leafCellTypeToChain map[string][]CellChain, cellLevelToType map[CellChain]map[CellLevel]api.CellType, )
Types ¶
type AffinityGroupState ¶ added in v0.3.1
type AffinityGroupState string
type AlgoAffinityGroup ¶
type AlgoAffinityGroup struct {
// contains filtered or unexported fields
}
AlgoAffinityGroup is the algorithm-internal representation of an affinity group.
func (*AlgoAffinityGroup) ToAffinityGroup ¶ added in v0.2.4
func (aag *AlgoAffinityGroup) ToAffinityGroup() api.AffinityGroup
type Cell ¶
type Cell interface { GetChain() CellChain GetLevel() CellLevel GetAddress() api.CellAddress GetParent() Cell SetParent(Cell) GetChildren() CellList SetChildren(CellList) AtOrHigherThanNode() bool GetPriority() CellPriority SetPriority(CellPriority) GetTotalLeafCellNum() int32 GetUsedLeafCellNumAtPriorities() map[CellPriority]int32 IncreaseUsedLeafCellNumAtPriority(CellPriority, int32) }
A Cell represents a set of leaf cells affinitized by their interconnection topology. Cells are organized as a tree through pointers to their parents / children.
type CellPriority ¶
type CellPriority int32
type ChainCellList ¶
ChainCellList maps each level in a chain to a CellList.
func NewChainCellList ¶
func NewChainCellList(top CellLevel) ChainCellList
func (ChainCellList) String ¶
func (ccl ChainCellList) String() string
type GenericCell ¶
type GenericCell struct {
// contains filtered or unexported fields
}
func (*GenericCell) AtOrHigherThanNode ¶ added in v0.2.0
func (c *GenericCell) AtOrHigherThanNode() bool
func (*GenericCell) GetAddress ¶ added in v0.3.0
func (c *GenericCell) GetAddress() api.CellAddress
func (*GenericCell) GetChain ¶
func (c *GenericCell) GetChain() CellChain
func (*GenericCell) GetChildren ¶
func (c *GenericCell) GetChildren() CellList
func (*GenericCell) GetLevel ¶
func (c *GenericCell) GetLevel() CellLevel
func (*GenericCell) GetParent ¶
func (c *GenericCell) GetParent() Cell
func (*GenericCell) GetPriority ¶
func (c *GenericCell) GetPriority() CellPriority
func (*GenericCell) GetState ¶ added in v0.3.1
func (c *GenericCell) GetState() CellState
func (*GenericCell) GetTotalLeafCellNum ¶ added in v0.3.4
func (c *GenericCell) GetTotalLeafCellNum() int32
func (*GenericCell) GetUsedLeafCellNumAtPriorities ¶ added in v0.3.4
func (c *GenericCell) GetUsedLeafCellNumAtPriorities() map[CellPriority]int32
func (*GenericCell) IncreaseUsedLeafCellNumAtPriority ¶ added in v0.3.4
func (c *GenericCell) IncreaseUsedLeafCellNumAtPriority(p CellPriority, delta int32)
func (*GenericCell) IsHealthy ¶ added in v0.3.3
func (c *GenericCell) IsHealthy() bool
func (*GenericCell) SetParent ¶
func (c *GenericCell) SetParent(p Cell)
type HivedAlgorithm ¶
type HivedAlgorithm struct {
// contains filtered or unexported fields
}
HivedAlgorithm implements an internal.SchedulerAlgorithm. It schedules affinity groups using the algorithm of HiveD. Note that the topologyAwareScheduler used in this struct is not another implementation of SchedulerAlgorithm; that is a specific algorithm for pod placement, used in intra-VC scheduling and opportunistic pod scheduling.
func NewHivedAlgorithm ¶
func NewHivedAlgorithm(sConfig *api.Config) *HivedAlgorithm
NewHivedAlgorithm initializes a HivedAlgorithm from the config file.
func (*HivedAlgorithm) AddAllocatedPod ¶
func (h *HivedAlgorithm) AddAllocatedPod(pod *core.Pod)
func (*HivedAlgorithm) AddNode ¶
func (h *HivedAlgorithm) AddNode(node *core.Node)
func (*HivedAlgorithm) AddUnallocatedPod ¶ added in v0.3.0
func (h *HivedAlgorithm) AddUnallocatedPod(*core.Pod)
func (*HivedAlgorithm) DeleteAllocatedPod ¶
func (h *HivedAlgorithm) DeleteAllocatedPod(pod *core.Pod)
func (*HivedAlgorithm) DeleteNode ¶
func (h *HivedAlgorithm) DeleteNode(node *core.Node)
func (*HivedAlgorithm) DeleteUnallocatedPod ¶ added in v0.3.0
func (h *HivedAlgorithm) DeleteUnallocatedPod(pod *core.Pod)
func (*HivedAlgorithm) GetAffinityGroup ¶ added in v0.2.4
func (h *HivedAlgorithm) GetAffinityGroup(name string) api.AffinityGroup
func (*HivedAlgorithm) GetAllAffinityGroups ¶ added in v0.3.0
func (h *HivedAlgorithm) GetAllAffinityGroups() api.AffinityGroupList
func (*HivedAlgorithm) GetAllVirtualClustersStatus ¶ added in v0.3.0
func (h *HivedAlgorithm) GetAllVirtualClustersStatus() map[api.VirtualClusterName]api.VirtualClusterStatus
func (*HivedAlgorithm) GetClusterStatus ¶ added in v0.3.0
func (h *HivedAlgorithm) GetClusterStatus() api.ClusterStatus
func (*HivedAlgorithm) GetPhysicalClusterStatus ¶ added in v0.3.0
func (h *HivedAlgorithm) GetPhysicalClusterStatus() api.PhysicalClusterStatus
func (*HivedAlgorithm) GetVirtualClusterStatus ¶ added in v0.3.0
func (h *HivedAlgorithm) GetVirtualClusterStatus(vcn api.VirtualClusterName) api.VirtualClusterStatus
func (*HivedAlgorithm) Schedule ¶
func (h *HivedAlgorithm) Schedule( pod *core.Pod, suggestedNodes []string, phase internal.SchedulingPhase) internal.PodScheduleResult
func (*HivedAlgorithm) UpdateNode ¶
func (h *HivedAlgorithm) UpdateNode(oldNode, newNode *core.Node)
type PhysicalCell ¶
type PhysicalCell struct { GenericCell // contains filtered or unexported fields }
PhysicalCell defines a cell in the physical cluster.
func NewPhysicalCell ¶
func NewPhysicalCell( c CellChain, l CellLevel, g bool, n int32, cellType api.CellType, address api.CellAddress, isNodeLevel bool) *PhysicalCell
func (*PhysicalCell) AddReservingOrReservedGroup ¶ added in v0.3.3
func (c *PhysicalCell) AddReservingOrReservedGroup(g *AlgoAffinityGroup)
func (*PhysicalCell) AddUsingGroup ¶ added in v0.3.1
func (c *PhysicalCell) AddUsingGroup(g *AlgoAffinityGroup)
func (*PhysicalCell) DeleteReservingOrReservedGroup ¶ added in v0.3.3
func (c *PhysicalCell) DeleteReservingOrReservedGroup(g *AlgoAffinityGroup)
func (*PhysicalCell) DeleteUsingGroup ¶ added in v0.3.1
func (c *PhysicalCell) DeleteUsingGroup(g *AlgoAffinityGroup)
func (*PhysicalCell) GetAPIStatus ¶ added in v0.3.0
func (c *PhysicalCell) GetAPIStatus() *api.PhysicalCellStatus
func (*PhysicalCell) GetPhysicalPlacement ¶
func (c *PhysicalCell) GetPhysicalPlacement() ([]string, []int32)
func (*PhysicalCell) GetPhysicalPlacementString ¶
func (c *PhysicalCell) GetPhysicalPlacementString() string
func (*PhysicalCell) GetReservingOrReservedGroup ¶ added in v0.3.3
func (c *PhysicalCell) GetReservingOrReservedGroup() *AlgoAffinityGroup
func (*PhysicalCell) GetUsingGroup ¶ added in v0.3.1
func (c *PhysicalCell) GetUsingGroup() *AlgoAffinityGroup
func (*PhysicalCell) GetVirtualCell ¶
func (c *PhysicalCell) GetVirtualCell() *VirtualCell
func (*PhysicalCell) IsPinned ¶ added in v0.3.3
func (c *PhysicalCell) IsPinned() bool
func (*PhysicalCell) IsSplit ¶ added in v0.2.0
func (c *PhysicalCell) IsSplit() bool
func (*PhysicalCell) SetChildren ¶ added in v0.3.0
func (c *PhysicalCell) SetChildren(children CellList)
func (*PhysicalCell) SetHealthiness ¶ added in v0.3.1
func (c *PhysicalCell) SetHealthiness(h api.CellHealthiness)
func (*PhysicalCell) SetPhysicalResources ¶
func (c *PhysicalCell) SetPhysicalResources(nodes []string, leafCellIndices []int32)
func (*PhysicalCell) SetPinned ¶ added in v0.3.3
func (c *PhysicalCell) SetPinned(pinned bool)
func (*PhysicalCell) SetPriority ¶ added in v0.3.0
func (c *PhysicalCell) SetPriority(p CellPriority)
func (*PhysicalCell) SetSplit ¶ added in v0.2.0
func (c *PhysicalCell) SetSplit(split bool)
func (*PhysicalCell) SetState ¶ added in v0.3.1
func (c *PhysicalCell) SetState(s CellState)
func (*PhysicalCell) SetVirtualCell ¶
func (c *PhysicalCell) SetVirtualCell(cell *VirtualCell)
type VirtualCell ¶
type VirtualCell struct { GenericCell // contains filtered or unexported fields }
VirtualCell defines a cell in a VC.
func NewVirtualCell ¶
func NewVirtualCell( vcn api.VirtualClusterName, c CellChain, l CellLevel, g bool, n int32, pac *VirtualCell, cellType api.CellType, address api.CellAddress, isNodeLevel bool) *VirtualCell
func (*VirtualCell) GetAPIStatus ¶ added in v0.3.0
func (c *VirtualCell) GetAPIStatus() *api.VirtualCellStatus
func (*VirtualCell) GetPhysicalCell ¶
func (c *VirtualCell) GetPhysicalCell() *PhysicalCell
func (*VirtualCell) GetPreassignedCell ¶ added in v0.3.3
func (c *VirtualCell) GetPreassignedCell() *VirtualCell
func (*VirtualCell) GetVirtualCluster ¶ added in v0.3.3
func (c *VirtualCell) GetVirtualCluster() api.VirtualClusterName
func (*VirtualCell) SetChildren ¶ added in v0.3.0
func (c *VirtualCell) SetChildren(children CellList)
func (*VirtualCell) SetPhysicalCell ¶
func (c *VirtualCell) SetPhysicalCell(cell *PhysicalCell)
func (*VirtualCell) SetPinnedCellId ¶ added in v0.3.3
func (c *VirtualCell) SetPinnedCellId(pid api.PinnedCellId)
func (*VirtualCell) SetPreAssignedCell ¶
func (c *VirtualCell) SetPreAssignedCell(cell *VirtualCell)
func (*VirtualCell) SetPriority ¶ added in v0.3.0
func (c *VirtualCell) SetPriority(p CellPriority)