tencent cloud

DescribeYarnQueue
Last updated: 2025-11-13 20:48:50
DescribeYarnQueue
Last updated: 2025-11-13 20:48:50

1. API Description

Domain name for API request: emr.intl.tencentcloudapi.com.

This API is used to obtain queue information in resource scheduling.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeYarnQueue.
Version Yes String Common Params. The value used for this API: 2019-01-03.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String Cluster ID
Scheduler Yes String Scheduler. The values are as follows:

1. capacity
2. fair

3. Output Parameters

Parameter Name Type Description
Queue String Queue information. It is a JSON string into which an object is converted. The corresponding Golang structure is as follows. For example, the first field Name of QueueWithConfigSetForFairScheduler: ```Name stringjson:"name"//queue name ``` -Name: field name - string: field type - json:"name: indicates the corresponding json key during serialization/deserialization. Below, json key is used for referring.- //: the following comment content corresponds to the Name field seen on the page. Fields with types starting with * indicate that the value may be null under JSON specifications. Different languages need to be received through a type that can express null, such as Java's wrapper types. Fields with types starting with [] indicate an array type, which is used when json key calls ModifyYarnQueueV2 API. - fair schedulertype QueueWithConfigSetForFairScheduler struct { Name string `json:"name"` //queue name MyId string `json:"myId"` // queue id, used for editing, deleting, and cloning ParentId string `json:"parentId"` // Parent queue Id Type *string `json:"type"` // queue affinity. Parent or empty. Setting to be a parent or empty can be performed only when it is confirmed that a queue is a parent queue and has no subqueues. The queue is normally used to support the placement policy nestedUserQueue AclSubmitApps *AclForYarnQueue `json:"aclSubmitApps"` // submission access control AclAdministerApps *AclForYarnQueue `json:"aclAdministerApps"` // management access control MinSharePreemptionTimeout *int `json:"minSharePreemptionTimeout"` // minimum share preemption timeout period FairSharePreemptionTimeout *int `json:"fairSharePreemptionTimeout"` // fair share preemption timeout period FairSharePreemptionThreshold *float32 `json:"fairSharePreemptionThreshold"` // fair share preemption threshold. Value range (0, 1] AllowPreemptionFrom *bool `json:"allowPreemptionFrom"` // preemption mode SchedulingPolicy *string `json:"schedulingPolicy"` // scheduling policy with the valid values of drf, fair, and fifo IsDefault *bool `json:"isDefault"` // whether it is the root.default queue IsRoot *bool `json:"isRoot"` // whether it is the root queue ConfigSets []ConfigSetForFairScheduler `json:"configSets"` // configuration set settings Children []QueueWithConfigSetForFairScheduler `json:"queues"` // subqueue information. recursive}type AclForYarnQueue struct { User *string `json:"user"` //username Group *string `json:"group"`//group name}type ConfigSetForFairScheduler struct { Name string `json:"name"` // configuration set name MinResources *YarnResource `json:"minResources"` // minimum resource amount MaxResources *YarnResource `json:"maxResources"` // maximum resource amount MaxChildResources *YarnResource `json:"maxChildResources"` //.The maximum quantity of resources that can be allocated to undefined subqueues MaxRunningApps *int `json:"maxRunningApps"` // the maximum number of apps that can run concurrently Weight *float32 `json:"weight"` // Weight MaxAMShare *float32 `json:"maxAMShare"` // App Master maximum share}type YarnResource struct { Vcores *int `json:"vcores"` Memory *int `json:"memory"` Type *string `json:"type"` // when the value is `percent`, it indicates usage as a percentage, otherwise an absolute value is used indeed}- Capacity schedulertype QueueForCapacitySchedulerV3 struct { Name string `json:"name"` // queue name MyId string `json:"myId"` // queue id, used in the case of editing, deleting, or cloning ParentId string `json:"parentId"` // parent queue id Configs []ConfigForCapacityV3 `json:"configs"` //configuration set settings State *string `json:"state"` // resource pool status DefaultNodeLabelExpression *string `json:"default-node-label-expression"` // default tag expression AclSubmitApps *AclForYarnQueue `json:"acl_submit_applications"` // submission access control AclAdminQueue *AclForYarnQueue `json:"acl_administer_queue"` //management access control MaxAllocationMB *int32 `json:"maximum-allocation-mb"` // maximum Memory allocated to Container MaxAllocationVcores *int32 `json:"maximum-allocation-vcores"` // the maximum number of Vcores for Container IsDefault *bool `json:"isDefault"`// whether it is the root.default queue IsRoot *bool `json:"isRoot"` // whether it is the root queue Queues []*QueueForCapacitySchedulerV3 `json:"queues"`//subqueue information. Recursive}type ConfigForCapacityV3 struct { Name string `json:"configName"` // configuration set name Labels []CapacityLabel `json:"labels"` // tag information MinUserLimitPercent *int32 `json:"minimum-user-limit-percent"` // minimum user capacity UserLimitFactor *float32 `json:"user-limit-factor" valid:"rangeExcludeLeft(0|)"` // user resource factor MaxApps *int32 `json:"maximum-applications" valid:"rangeExcludeLeft(0|)"` // the maximum number of applications Max-Applications MaxAmPercent *float32 `json:"maximum-am-resource-percent"` // the maximum AM ratio DefaultApplicationPriority *int32 `json:"default-application-priority"` // resource pool priority}type CapacityLabel struct { Name string `json:"labelName"` Capacity *float32 `json:"capacity"` // capacity MaxCapacity *float32 `json:"maximum-capacity"` //maximum capacity}type AclForYarnQueue struct { User *string `json:"user"` //username Group *string `json:"group"`//group name}.
Version String Version
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Obtaining Queue Information on Resource Scheduling

Input Example

POST / HTTP/1.1
Host: emr.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeYarnQueue
<Common request parameters>

{
    "InstanceId": "emr-fa13",
    "Scheduler": "capacity"
}

Output Example

{
    "Response": {
        "Queue": "{\"name\":\"root\",\"myId\":\"root\",\"parentId\":\"root\",\"configs\":[{\"configName\":\"default\",\"labels\":[{\"labelName\":\"\\u003cDEFAULT_PARTITION\\u003e\",\"capacity\":null,\"maximum-capacity\":null,\"state\":0},{\"labelName\":\"test\",\"capacity\":null,\"maximum-capacity\":null,\"state\":0},{\"labelName\":\"test2\",\"capacity\":null,\"maximum-capacity\":null,\"state\":0}],\"minimum-user-limit-percent\":null,\"user-limit-factor\":null,\"maximum-applications\":null,\"maximum-am-resource-percent\":null,\"default-application-priority\":null}],\"state\":null,\"default-node-label-expression\":null,\"acl_submit_applications\":null,\"acl_administer_queue\":null,\"maximum-allocation-mb\":null,\"maximum-allocation-vcores\":null,\"isDefault\":null,\"isRoot\":true,\"queues\":[{\"name\":\"default\",\"myId\":\"root.default\",\"parentId\":\"root\",\"configs\":[{\"configName\":\"default\",\"labels\":[{\"labelName\":\"\\u003cDEFAULT_PARTITION\\u003e\",\"capacity\":50,\"maximum-capacity\":100,\"state\":0}],\"minimum-user-limit-percent\":null,\"user-limit-factor\":1,\"maximum-applications\":null,\"maximum-am-resource-percent\":null,\"default-application-priority\":null}],\"state\":null,\"default-node-label-expression\":null,\"acl_submit_applications\":null,\"acl_administer_queue\":null,\"maximum-allocation-mb\":null,\"maximum-allocation-vcores\":null,\"isDefault\":true,\"isRoot\":null,\"queues\":[]},{\"name\":\"q1\",\"myId\":\"root.q1\",\"parentId\":\"root\",\"configs\":[{\"configName\":\"default\",\"labels\":[{\"labelName\":\"\\u003cDEFAULT_PARTITION\\u003e\",\"capacity\":50,\"maximum-capacity\":100,\"state\":0},{\"labelName\":\"test\",\"capacity\":100,\"maximum-capacity\":100,\"state\":0}],\"minimum-user-limit-percent\":null,\"user-limit-factor\":null,\"maximum-applications\":null,\"maximum-am-resource-percent\":null,\"default-application-priority\":null}],\"state\":\"RUNNING\",\"default-node-label-expression\":null,\"acl_submit_applications\":{\"user\":\"*\",\"group\":\"*\"},\"acl_administer_queue\":{\"user\":\"*\",\"group\":\"*\"},\"maximum-allocation-mb\":null,\"maximum-allocation-vcores\":null,\"isDefault\":null,\"isRoot\":null,\"queues\":[]}]}",
        "Version": "v3",
        "RequestId": "3f63c907-d4e4-4856-b05d-949eedc2151a"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.
InternalError.CamCgwError An error occurred while calling another service API.
InternalError.WoodServerError An error occurred while calling another service API.
UnauthorizedOperation.CheckCamAuth Unauthorized operation.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback