capacity

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNodeCapacity

func GetNodeCapacity(available, reserved, singleExecutor *resources.Resources) int

GetNodeCapacity returns how many singleExecutor can fit within available - reserved

Types

type NodeAndExecutorCapacity

type NodeAndExecutorCapacity struct {
	NodeName string
	Capacity int
}

NodeAndExecutorCapacity is a pair of node name and capacity (how many executors can it fit)

func FilterOutNodesWithoutCapacity

func FilterOutNodesWithoutCapacity(capacities []NodeAndExecutorCapacity) []NodeAndExecutorCapacity

FilterOutNodesWithoutCapacity returns a slice of nodes with non-zero capacity

func GetNodeCapacities

func GetNodeCapacities(
	nodePriorityOrder []string,
	nodeGroupSchedulingMetadata resources.NodeGroupSchedulingMetadata,
	reservedResources resources.NodeGroupResources,
	singleExecutor *resources.Resources,
) []NodeAndExecutorCapacity

GetNodeCapacities return value is ordered according to nodePriorityOrder

Jump to

Keyboard shortcuts

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