dao

package
v1.0.0-1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: Apache-2.0 Imports: 0 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.

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.

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 AllocationDAOInfo

type AllocationDAOInfo struct {
	AllocationKey    string            `json:"allocationKey"`
	AllocationTags   map[string]string `json:"allocationTags"`
	RequestTime      int64             `json:"requestTime"`     // Allocation ask's createTime if PlaceholderUsed is false, otherwise equivalent to placeholder allocation's createTime
	AllocationTime   int64             `json:"allocationTime"`  // Allocation's createTime
	AllocationDelay  int64             `json:"allocationDelay"` // Difference between AllocationTime and RequestTime
	UUID             string            `json:"uuid"`
	ResourcePerAlloc map[string]int64  `json:"resource"`
	Priority         string            `json:"priority"`
	QueueName        string            `json:"queueName"`
	NodeID           string            `json:"nodeId"`
	ApplicationID    string            `json:"applicationId"`
	Partition        string            `json:"partition"`
	Placeholder      bool              `json:"placeholder"`
	PlaceholderUsed  bool              `json:"placeholderUsed"`
	TaskGroupName    string            `json:"taskGroupName"`
}

type ApplicationDAOInfo

type ApplicationDAOInfo struct {
	ApplicationID   string               `json:"applicationID"`
	UsedResource    map[string]int64     `json:"usedResource"`
	MaxUsedResource map[string]int64     `json:"maxUsedResource"`
	Partition       string               `json:"partition"`
	QueueName       string               `json:"queueName"`
	SubmissionTime  int64                `json:"submissionTime"`
	FinishedTime    *int64               `json:"finishedTime"`
	Allocations     []AllocationDAOInfo  `json:"allocations"`
	State           string               `json:"applicationState"`
	User            string               `json:"user"`
	RejectedMessage string               `json:"rejectedMessage"`
	StateLog        []StateDAOInfo       `json:"stateLog"`
	PlaceholderData []PlaceholderDAOInfo `json:"placeholderData"`
}

type ApplicationHistoryDAOInfo

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

type ApplicationsDAOInfo

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

type ClusterDAOInfo

type ClusterDAOInfo struct {
	StartTime             int64               `json:"startTime"`
	RMBuildInformation    []map[string]string `json:"rmBuildInformation"`
	PartitionName         string              `json:"partition"`
	ClusterName           string              `json:"clusterName"`
	TotalApplications     string              `json:"totalApplications"`
	FailedApplications    string              `json:"failedApplications"`
	PendingApplications   string              `json:"pendingApplications"`
	RunningApplications   string              `json:"runningApplications"`
	CompletedApplications string              `json:"completedApplications"`
	TotalContainers       string              `json:"totalContainers"`
	FailedContainers      string              `json:"failedContainers"`
	PendingContainers     string              `json:"pendingContainers"`
	RunningContainers     string              `json:"runningContainers"`
	ActiveNodes           string              `json:"activeNodes"`
	TotalNodes            string              `json:"totalNodes"`
	FailedNodes           string              `json:"failedNodes"`
}

type ClusterUtilDAOInfo

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

type ClustersUtilDAOInfo

type ClustersUtilDAOInfo struct {
	PartitionName string                `json:"partition"`
	ClustersUtil  []*ClusterUtilDAOInfo `json:"utilization"`
}

type ContainerHistoryDAOInfo

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

type HealthCheckInfo

type HealthCheckInfo struct {
	Name             string
	Succeeded        bool
	Description      string
	DiagnosisMessage string
}

type NodeDAOInfo

type NodeDAOInfo struct {
	NodeID      string               `json:"nodeID"`
	HostName    string               `json:"hostName"`
	RackName    string               `json:"rackName"`
	Capacity    map[string]int64     `json:"capacity"`
	Allocated   map[string]int64     `json:"allocated"`
	Occupied    map[string]int64     `json:"occupied"`
	Available   map[string]int64     `json:"available"`
	Utilized    map[string]int64     `json:"utilized"`
	Allocations []*AllocationDAOInfo `json:"allocations"`
	Schedulable bool                 `json:"schedulable"`
}

type NodeInfo

type NodeInfo struct {
	NodeID     string `json:"nodeId"`
	Capability string `json:"capability"`
}

type NodeSortingPolicy

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

type NodeUtilDAOInfo

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

type NodesDAOInfo

type NodesDAOInfo struct {
	PartitionName string         `json:"partitionName"`
	Nodes         []*NodeDAOInfo `json:"nodesInfo"`
}

type NodesUtilDAOInfo

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

type PartitionCapacity

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

type PartitionDAOInfo

type PartitionDAOInfo struct {
	PartitionName string            `json:"partitionName"`
	Capacity      PartitionCapacity `json:"capacity"`
	Nodes         []NodeInfo        `json:"nodes"`
	Queues        QueueDAOInfo      `json:"queues"`
}

type PartitionInfo

type PartitionInfo struct {
	ClusterID               string            `json:"clusterId"`
	Name                    string            `json:"name"`
	Capacity                PartitionCapacity `json:"capacity"`
	NodeSortingPolicy       NodeSortingPolicy `json:"nodeSortingPolicy"`
	Applications            map[string]int    `json:"applications"`
	State                   string            `json:"state"`
	LastStateTransitionTime int64             `json:"lastStateTransitionTime"`
}

type PartitionQueueDAOInfo

type PartitionQueueDAOInfo struct {
	QueueName          string                  `json:"queuename"`
	Status             string                  `json:"status"`
	Partition          string                  `json:"partition"`
	MaxResource        map[string]int64        `json:"maxResource"`
	GuaranteedResource map[string]int64        `json:"guaranteedResource"`
	AllocatedResource  map[string]int64        `json:"allocatedResource"`
	IsLeaf             bool                    `json:"isLeaf"`
	IsManaged          bool                    `json:"isManaged"`
	Properties         map[string]string       `json:"properties"`
	Parent             string                  `json:"parent"`
	TemplateInfo       *TemplateInfo           `json:"template"`
	Children           []PartitionQueueDAOInfo `json:"children"`
	AbsUsedCapacity    map[string]int64        `json:"absUsedCapacity"`
}

type PlaceholderDAOInfo

type PlaceholderDAOInfo struct {
	TaskGroupName string           `json:"taskGroupName"`
	Count         int64            `json:"count"`
	MinResource   map[string]int64 `json:"minResource"`
	RequiredNode  string           `json:"requiredNode"`
	Replaced      int64            `json:"replaced"`
}

type QueueCapacity

type QueueCapacity struct {
	Capacity        map[string]int64 `json:"capacity"`
	MaxCapacity     map[string]int64 `json:"maxCapacity"`
	UsedCapacity    map[string]int64 `json:"usedCapacity"`
	AbsUsedCapacity map[string]int64 `json:"absUsedCapacity"`
}

type QueueDAOInfo

type QueueDAOInfo struct {
	QueueName   string            `json:"queuename"`
	Status      string            `json:"status"`
	Capacities  QueueCapacity     `json:"capacities"`
	ChildQueues []QueueDAOInfo    `json:"queues"`
	Properties  map[string]string `json:"properties"`
}

type SchedulerHealthDAOInfo

type SchedulerHealthDAOInfo struct {
	Healthy      bool
	HealthChecks []HealthCheckInfo
}

func (*SchedulerHealthDAOInfo) AddHealthCheckInfo

func (s *SchedulerHealthDAOInfo) AddHealthCheckInfo(succeeded bool, name, description, diagnosis string)

func (*SchedulerHealthDAOInfo) SetHealthStatus

func (s *SchedulerHealthDAOInfo) SetHealthStatus()

type StateDAOInfo

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

type TemplateInfo

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

type ValidateConfResponse

type ValidateConfResponse struct {
	Allowed bool   `json:"allowed"`
	Reason  string `json:"reason"`
}

type YAPIError

type YAPIError struct {
	StatusCode  int    `json:"status_code"`
	Message     string `json:"message"`
	Description string `json:"description"`
}

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