ranking

package
v0.3.22 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

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

Chain assigns a random rank to each node to allow the requester to select random top nodes for job execution.

func NewChain

func NewChain() *Chain

func (*Chain) Add

func (c *Chain) Add(ranker ...requester.NodeRanker)

Add ranker to the chain

func (*Chain) RankNodes

func (c *Chain) RankNodes(ctx context.Context, job model.Job, nodes []model.NodeInfo) ([]requester.NodeRank, error)

type EnginesNodeRanker

type EnginesNodeRanker struct {
}

func NewEnginesNodeRanker

func NewEnginesNodeRanker() *EnginesNodeRanker

func (*EnginesNodeRanker) RankNodes

func (s *EnginesNodeRanker) RankNodes(ctx context.Context, job model.Job, nodes []model.NodeInfo) ([]requester.NodeRank, error)

RankNodes ranks nodes based on the engines the compute nodes are accepting: - Rank 10: Node is supporting the engine the job is using. - Rank -1: Node is not supporting the engine the job is using. - Rank 0: Node supported engines are not set, or the node was discovered not through nodeInfoPublisher (e.g. identity protocol)

type LabelsNodeRanker

type LabelsNodeRanker struct {
}

func NewLabelsNodeRanker

func NewLabelsNodeRanker() *LabelsNodeRanker

func (*LabelsNodeRanker) RankNodes

func (s *LabelsNodeRanker) RankNodes(ctx context.Context, job model.Job, nodes []model.NodeInfo) ([]requester.NodeRank, error)

RankNodes ranks nodes based on the node labels and job selectors: - Rank 1: Selectors match node labels. - Rank -1: Selectors don't match node labels. - Rank 0: Job selectors are not set.

type MaxUsageNodeRanker

type MaxUsageNodeRanker struct {
}

func NewMaxUsageNodeRanker

func NewMaxUsageNodeRanker() *MaxUsageNodeRanker

func (*MaxUsageNodeRanker) RankNodes

func (s *MaxUsageNodeRanker) RankNodes(ctx context.Context, job model.Job, nodes []model.NodeInfo) ([]requester.NodeRank, error)

RankNodes ranks nodes based on the MaxJobRequirements the compute nodes are accepting: - Rank 10: Node is accepting MaxJobRequirements that are equal or higher than the job requirements. - Rank -1: Node is accepting MaxJobRequirements that are lower than the job requirements. - Rank 0: Node MaxJobRequirements are not set, or the node was discovered not through nodeInfoPublisher (e.g. identity protocol)

type RandomNodeRanker

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

RandomNodeRanker assigns a random rank to each node to allow the requester to select random top nodes for job execution.

func NewRandomNodeRanker

func NewRandomNodeRanker(params RandomNodeRankerParams) *RandomNodeRanker

func (*RandomNodeRanker) RankNodes

func (s *RandomNodeRanker) RankNodes(ctx context.Context, job model.Job, nodes []model.NodeInfo) ([]requester.NodeRank, error)

type RandomNodeRankerParams

type RandomNodeRankerParams struct {
	RandomnessRange int
}

Jump to

Keyboard shortcuts

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