dao

package
v1.5.1-1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocationAskDAOInfo added in v1.1.0

type AllocationAskDAOInfo struct {
	AllocationKey       string                     `json:"allocationKey"` // no omitempty, allocation key should not be empty
	AllocationTags      map[string]string          `json:"allocationTags,omitempty"`
	RequestTime         int64                      `json:"requestTime,omitempty"`
	ResourcePerAlloc    map[string]int64           `json:"resource,omitempty"`
	PendingCount        int32                      `json:"pendingCount,omitempty"`
	Priority            string                     `json:"priority,omitempty"`
	RequiredNodeID      string                     `json:"requiredNodeId,omitempty"`
	ApplicationID       string                     `json:"applicationId,omitempty"`
	Partition           string                     `json:"partition,omitempty"`
	Placeholder         bool                       `json:"placeholder,omitempty"`
	PlaceholderTimeout  int64                      `json:"placeholderTimeout,omitempty"`
	TaskGroupName       string                     `json:"taskGroupName,omitempty"`
	AllocationLog       []*AllocationAskLogDAOInfo `json:"allocationLog,omitempty"`
	TriggeredPreemption bool                       `json:"triggeredPreemption,omitempty"`
	Originator          bool                       `json:"originator,omitempty"`
	SchedulingAttempted bool                       `json:"schedulingAttempted,omitempty"`
	TriggeredScaleUp    bool                       `json:"triggeredScaleUp,omitempty"`
}

type AllocationAskLogDAOInfo added in v1.1.0

type AllocationAskLogDAOInfo struct {
	Message        string `json:"message,omitempty"`
	LastOccurrence int64  `json:"lastOccurrence,omitempty"`
	Count          int32  `json:"count,omitempty"`
}

type AllocationDAOInfo

type AllocationDAOInfo struct {
	AllocationKey    string            `json:"allocationKey"` // no omitempty, allocation key should not be empty
	AllocationTags   map[string]string `json:"allocationTags,omitempty"`
	RequestTime      int64             `json:"requestTime,omitempty"`     // Allocation ask's createTime if PlaceholderUsed is false, otherwise equivalent to placeholder allocation's createTime
	AllocationTime   int64             `json:"allocationTime,omitempty"`  // Allocation's createTime
	AllocationDelay  int64             `json:"allocationDelay,omitempty"` // Difference between AllocationTime and RequestTime
	UUID             string            `json:"uuid,omitempty"`            // Deprecated. Need to remove this in next major release
	AllocationID     string            `json:"allocationID,omitempty"`    // Added to replace UUID.
	ResourcePerAlloc map[string]int64  `json:"resource,omitempty"`
	Priority         string            `json:"priority,omitempty"`
	NodeID           string            `json:"nodeId,omitempty"`
	ApplicationID    string            `json:"applicationId,omitempty"`
	Partition        string            `json:"partition,omitempty"`
	Placeholder      bool              `json:"placeholder,omitempty"`
	PlaceholderUsed  bool              `json:"placeholderUsed,omitempty"`
	TaskGroupName    string            `json:"taskGroupName,omitempty"`
	Preempted        bool              `json:"preempted,omitempty"`
}

type ApplicationDAOInfo

type ApplicationDAOInfo struct {
	ApplicationID      string                  `json:"applicationID"` // no omitempty, application id should not be empty
	UsedResource       map[string]int64        `json:"usedResource,omitempty"`
	MaxUsedResource    map[string]int64        `json:"maxUsedResource,omitempty"`
	PendingResource    map[string]int64        `json:"pendingResource,omitempty"`
	Partition          string                  `json:"partition"` // no omitempty, partition should not be empty
	QueueName          string                  `json:"queueName"` // no omitempty, queue name should not be empty
	SubmissionTime     int64                   `json:"submissionTime,omitempty"`
	FinishedTime       *int64                  `json:"finishedTime,omitempty"`
	Requests           []*AllocationAskDAOInfo `json:"requests,omitempty"`
	Allocations        []*AllocationDAOInfo    `json:"allocations,omitempty"`
	State              string                  `json:"applicationState,omitempty"`
	User               string                  `json:"user,omitempty"`
	Groups             []string                `json:"groups,omitempty"`
	RejectedMessage    string                  `json:"rejectedMessage,omitempty"`
	StateLog           []*StateDAOInfo         `json:"stateLog,omitempty"`
	PlaceholderData    []*PlaceholderDAOInfo   `json:"placeholderData,omitempty"`
	HasReserved        bool                    `json:"hasReserved,omitempty"`
	Reservations       []string                `json:"reservations,omitempty"`
	MaxRequestPriority int32                   `json:"maxRequestPriority,omitempty"`
}

type ApplicationHistoryDAOInfo

type ApplicationHistoryDAOInfo struct {
	Timestamp         int64  `json:"timestamp,omitempty"`
	TotalApplications string `json:"totalApplications,omitempty"`
}

type ApplicationsDAOInfo

type ApplicationsDAOInfo struct {
	Applications []ApplicationDAOInfo `json:"applications,omitempty"`
}

type ClusterDAOInfo

type ClusterDAOInfo struct {
	StartTime          int64               `json:"startTime,omitempty"`
	RMBuildInformation []map[string]string `json:"rmBuildInformation,omitempty"`
	PartitionName      string              `json:"partition"`   // no omitempty, partition name should not be empty
	ClusterName        string              `json:"clusterName"` // no omitempty, cluster name should not be empty
}

type ClusterUtilDAOInfo

type ClusterUtilDAOInfo struct {
	ResourceType string `json:"type,omitempty"`
	Total        int64  `json:"total,omitempty"`
	Used         int64  `json:"used,omitempty"`
	Usage        string `json:"usage,omitempty"`
}

type ConfigDAOInfo added in v1.4.0

type ConfigDAOInfo struct {
	*configs.SchedulerConfig `yaml:",inline"`
	Extra                    map[string]string `yaml:",omitempty" json:",omitempty"`
	DeadlockDetectionEnabled bool
	DeadlockTimeoutSeconds   int
}

type ContainerHistoryDAOInfo

type ContainerHistoryDAOInfo struct {
	Timestamp       int64  `json:"timestamp,omitempty"`
	TotalContainers string `json:"totalContainers,omitempty"`
}

type EventRecordDAO added in v1.4.0

type EventRecordDAO struct {
	InstanceUUID string
	LowestID     uint64
	HighestID    uint64
	EventRecords []*si.EventRecord
}

type GroupResourceUsageDAOInfo added in v1.2.0

type GroupResourceUsageDAOInfo struct {
	GroupName    string                `json:"groupName"` // no omitempty, group name should not be empty
	Applications []string              `json:"applications,omitempty"`
	Queues       *ResourceUsageDAOInfo `json:"queues,omitempty"`
}

type HealthCheckInfo

type HealthCheckInfo struct {
	Name             string `json:",omitempty"`
	Succeeded        bool   // no omitempty, a false value gives a quick way to understand the result.
	Description      string `json:",omitempty"`
	DiagnosisMessage string `json:",omitempty"`
}

type NodeDAOInfo

type NodeDAOInfo struct {
	NodeID       string               `json:"nodeID"` // no omitempty, node id should not be empty
	HostName     string               `json:"hostName,omitempty"`
	RackName     string               `json:"rackName,omitempty"`
	Attributes   map[string]string    `json:"attributes,omitempty"`
	Capacity     map[string]int64     `json:"capacity,omitempty"`
	Allocated    map[string]int64     `json:"allocated,omitempty"`
	Occupied     map[string]int64     `json:"occupied,omitempty"`
	Available    map[string]int64     `json:"available,omitempty"`
	Utilized     map[string]int64     `json:"utilized,omitempty"`
	Allocations  []*AllocationDAOInfo `json:"allocations,omitempty"`
	Schedulable  bool                 `json:"schedulable"` // no omitempty, a false value gives a quick way to understand whether a node is schedulable.
	IsReserved   bool                 `json:"isReserved"`  // no omitempty, a false value gives a quick way to understand whether a node is reserved.
	Reservations []string             `json:"reservations,omitempty"`
}

type NodeSortingPolicy

type NodeSortingPolicy struct {
	Type            string             `json:"type,omitempty"`
	ResourceWeights map[string]float64 `json:"resourceWeights,omitempty"`
}

type NodeUtilDAOInfo

type NodeUtilDAOInfo struct {
	BucketName string   `json:"bucketName,omitempty"`
	NumOfNodes int64    `json:"numOfNodes,omitempty"`
	NodeNames  []string `json:"nodeNames,omitempty"`
}

type NodesDAOInfo

type NodesDAOInfo struct {
	PartitionName string         `json:"partitionName"` // no omitempty, partition name shoud not be empty
	Nodes         []*NodeDAOInfo `json:"nodesInfo,omitempty"`
}

type NodesUtilDAOInfo

type NodesUtilDAOInfo struct {
	ResourceType string             `json:"type,omitempty"`
	NodesUtil    []*NodeUtilDAOInfo `json:"utilization,omitempty"`
}

type PartitionCapacity

type PartitionCapacity struct {
	Capacity     map[string]int64 `json:"capacity,omitempty"`
	UsedCapacity map[string]int64 `json:"usedCapacity,omitempty"`
	Utilization  map[string]int64 `json:"utilization,omitempty"`
}

type PartitionInfo

type PartitionInfo struct {
	ClusterID               string            `json:"clusterId"`         // no omitempty, cluster id should not be empty
	Name                    string            `json:"name"`              // no omitempty, name should not be empty
	Capacity                PartitionCapacity `json:"capacity"`          // no omitempty, omitempty doesn't work on a structure value
	NodeSortingPolicy       NodeSortingPolicy `json:"nodeSortingPolicy"` // no omitempty, omitempty doesn't work on a structure value
	TotalNodes              int               `json:"totalNodes,omitempty"`
	Applications            map[string]int    `json:"applications,omitempty"`
	TotalContainers         int               `json:"totalContainers,omitempty"`
	State                   string            `json:"state,omitempty"`
	LastStateTransitionTime int64             `json:"lastStateTransitionTime,omitempty"`
}

type PartitionNodesUtilDAOInfo added in v1.5.0

type PartitionNodesUtilDAOInfo struct {
	ClusterID     string              `json:"clusterId"` // no omitempty, cluster id should not be empty
	Partition     string              `json:"partition"` // no omitempty, partition should not be empty
	NodesUtilList []*NodesUtilDAOInfo `json:"utilizations,omitempty"`
}

type PartitionQueueDAOInfo

type PartitionQueueDAOInfo struct {
	QueueName              string                  `json:"queuename"` // no omitempty, queue name should not be empty
	Status                 string                  `json:"status,omitempty"`
	Partition              string                  `json:"partition"` // no omitempty, queue name should not be empty
	PendingResource        map[string]int64        `json:"pendingResource,omitempty"`
	MaxResource            map[string]int64        `json:"maxResource,omitempty"`
	GuaranteedResource     map[string]int64        `json:"guaranteedResource,omitempty"`
	AllocatedResource      map[string]int64        `json:"allocatedResource,omitempty"`
	PreemptingResource     map[string]int64        `json:"preemptingResource,omitempty"`
	HeadRoom               map[string]int64        `json:"headroom,omitempty"`
	IsLeaf                 bool                    `json:"isLeaf"`    // no omitempty, a false value gives a quick way to understand whether it's leaf.
	IsManaged              bool                    `json:"isManaged"` // no omitempty, a false value gives a quick way to understand whether it's managed.
	Properties             map[string]string       `json:"properties,omitempty"`
	Parent                 string                  `json:"parent,omitempty"`
	TemplateInfo           *TemplateInfo           `json:"template,omitempty"`
	Children               []PartitionQueueDAOInfo `json:"children,omitempty"`
	ChildrenNames          []string                `json:"childrenNames,omitempty"`
	AbsUsedCapacity        map[string]int64        `json:"absUsedCapacity,omitempty"`
	MaxRunningApps         uint64                  `json:"maxRunningApps,omitempty"`
	RunningApps            uint64                  `json:"runningApps,omitempty"`
	CurrentPriority        int32                   `json:"currentPriority"` // no omitempty, as the current priority value may be 0, which is a valid priority level
	AllocatingAcceptedApps []string                `json:"allocatingAcceptedApps,omitempty"`
}

type PlaceholderDAOInfo

type PlaceholderDAOInfo struct {
	TaskGroupName string           `json:"taskGroupName,omitempty"`
	Count         int64            `json:"count,omitempty"`
	MinResource   map[string]int64 `json:"minResource,omitempty"`
	Replaced      int64            `json:"replaced,omitempty"`
	TimedOut      int64            `json:"timedout,omitempty"`
}

type ResourceUsageDAOInfo added in v1.2.0

type ResourceUsageDAOInfo struct {
	QueuePath           string                  `json:"queuePath"` // no omitempty, queue path should not be empty
	ResourceUsage       *resources.Resource     `json:"resourceUsage,omitempty"`
	RunningApplications []string                `json:"runningApplications,omitempty"`
	MaxResources        *resources.Resource     `json:"maxResources,omitempty"`
	MaxApplications     uint64                  `json:"maxApplications,omitempty"`
	Children            []*ResourceUsageDAOInfo `json:"children,omitempty"`
}

type SchedulerHealthDAOInfo

type SchedulerHealthDAOInfo struct {
	Healthy      bool              // no omitempty, a false value gives a quick way to understand the result.
	HealthChecks []HealthCheckInfo `json:",omitempty"`
}

type StateDAOInfo

type StateDAOInfo struct {
	Time             int64  `json:"time,omitempty"`
	ApplicationState string `json:"applicationState,omitempty"`
}

type TemplateInfo

type TemplateInfo struct {
	MaxApplications    uint64            `json:"maxApplications,omitempty"`
	MaxResource        map[string]int64  `json:"maxResource,omitempty"`
	GuaranteedResource map[string]int64  `json:"guaranteedResource,omitempty"`
	Properties         map[string]string `json:"properties,omitempty"`
}

type UserResourceUsageDAOInfo added in v1.2.0

type UserResourceUsageDAOInfo struct {
	UserName string                `json:"userName"` // no omitempty, user name should not be empty
	Groups   map[string]string     `json:"groups,omitempty"`
	Queues   *ResourceUsageDAOInfo `json:"queues,omitempty"`
}

type ValidateConfResponse

type ValidateConfResponse struct {
	Allowed bool   `json:"allowed"` // no omitempty, a false value gives a quick way to understand the result.
	Reason  string `json:"reason,omitempty"`
}

type YAPIError

type YAPIError struct {
	StatusCode  int    `json:"status_code"` // no omitempty, status code should not be 0
	Message     string `json:"message,omitempty"`
	Description string `json:"description,omitempty"`
}

func NewYAPIError

func NewYAPIError(err error, statusCode int, message string) *YAPIError

Jump to

Keyboard shortcuts

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