dao

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

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"`
	UUID             string            `json:"uuid"`
	ResourcePerAlloc string            `json:"resource"`
	Priority         string            `json:"priority"`
	QueueName        string            `json:"queueName"`
	NodeID           string            `json:"nodeId"`
	ApplicationID    string            `json:"applicationId"`
	Partition        string            `json:"partition"`
}

type ApplicationDAOInfo

type ApplicationDAOInfo struct {
	ApplicationID  string              `json:"applicationID"`
	UsedResource   string              `json:"usedResource"`
	Partition      string              `json:"partition"`
	QueueName      string              `json:"queueName"`
	SubmissionTime int64               `json:"submissionTime"`
	Allocations    []AllocationDAOInfo `json:"allocations"`
	State          string              `json:"applicationState"`
}

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 {
	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 added in v0.10.0

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

type ClustersUtilDAOInfo added in v0.10.0

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 added in v0.10.0

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    string               `json:"capacity"`
	Allocated   string               `json:"allocated"`
	Occupied    string               `json:"occupied"`
	Available   string               `json:"available"`
	Allocations []*AllocationDAOInfo `json:"allocations"`
	Schedulable bool                 `json:"schedulable"`
}

type NodeInfo

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

type NodeSortingPolicy added in v0.12.0

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

type NodeUtilDAOInfo added in v0.10.0

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 added in v0.10.0

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

type PartitionCapacity

type PartitionCapacity struct {
	Capacity     string `json:"capacity"`
	UsedCapacity string `json:"usedCapacity"`
}

type PartitionDAOInfo

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

type PartitionInfo added in v0.10.0

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 string            `json:"lastStateTransitionTime"`
}

type PartitionQueueDAOInfo added in v0.11.0

type PartitionQueueDAOInfo struct {
	QueueName          string                  `json:"queuename"`
	Status             string                  `json:"status"`
	Partition          string                  `json:"partition"`
	MaxResource        string                  `json:"maxResource"`
	GuaranteedResource string                  `json:"guaranteedResource"`
	AllocatedResource  string                  `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"`
}

type QueueCapacity

type QueueCapacity struct {
	Capacity        string `json:"capacity"`
	MaxCapacity     string `json:"maxCapacity"`
	UsedCapacity    string `json:"usedCapacity"`
	AbsUsedCapacity string `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 added in v0.10.0

type SchedulerHealthDAOInfo struct {
	Healthy      bool
	HealthChecks []HealthCheckInfo
}

func (*SchedulerHealthDAOInfo) AddHealthCheckInfo added in v0.10.0

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

func (*SchedulerHealthDAOInfo) SetHealthStatus added in v0.10.0

func (s *SchedulerHealthDAOInfo) SetHealthStatus()

type TemplateInfo added in v0.12.0

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

type ValidateConfResponse

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

type YAPIError added in v0.11.0

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

func NewYAPIError added in v0.11.0

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