common

package
v0.0.0-...-f394a37 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ApplicationDefaultQueue = "root"
View Source
const CPU = "vcore"
View Source
const DefaultConfigMapName = "yunikorn-configs"

Configuration

View Source
const DefaultNodeAttributeHostNameKey = "si.io/hostname"

Cluster

View Source
const DefaultNodeAttributeRackNameKey = "si.io/rackname"
View Source
const DefaultPartition = "default"
View Source
const DefaultRackName = "/rack-default"
View Source
const LabelApplicationId = "applicationId"

Application

View Source
const LabelQueueName = "queue"
View Source
const Memory = "memory"

Resource

View Source
const SparkLabelAppId = "spark-app-id"

Spark

View Source
const SparkLabelRole = "spark-role"
View Source
const SparkLabelRoleDriver = "driver"

Variables

This section is empty.

Functions

func Add

func Add(left *si.Resource, right *si.Resource) *si.Resource

func CreateReleaseAllocationRequestForTask

func CreateReleaseAllocationRequestForTask(appId, allocUuid, partition string) si.UpdateRequest

func CreateUpdateRequestForDeleteNode

func CreateUpdateRequestForDeleteNode(node Node) si.UpdateRequest

func CreateUpdateRequestForNewNode

func CreateUpdateRequestForNewNode(node Node) si.UpdateRequest

func CreateUpdateRequestForTask

func CreateUpdateRequestForTask(appId, taskId string, resource *si.Resource) si.UpdateRequest

func CreateUpdateRequestForUpdatedNode

func CreateUpdateRequestForUpdatedNode(node Node) si.UpdateRequest

func Equals

func Equals(left *si.Resource, right *si.Resource) bool

func GetNodeResource

func GetNodeResource(nodeStatus *v1.NodeStatus) *si.Resource

func GetPodResource

func GetPodResource(pod *v1.Pod) (resource *si.Resource)

Types

type Node

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

stores info about what scheduler cares about a node

func CreateFrom

func CreateFrom(node *v1.Node) Node

func CreateFromNodeSpec

func CreateFromNodeSpec(nodeName string, nodeUid string, nodeResource *si.Resource) Node

type ResourceBuilder

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

resource builder is a helper struct to construct si resources

func NewResourceBuilder

func NewResourceBuilder() *ResourceBuilder

func (*ResourceBuilder) AddResource

func (w *ResourceBuilder) AddResource(name string, value int64) *ResourceBuilder

func (*ResourceBuilder) Build

func (w *ResourceBuilder) Build() *si.Resource

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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