取消保存yarn资源调度的资源配置

最近更新时间: 2026-09-17 00:05:48

1. 接口描述

接口请求域名: tbdsnew.api3.fincloud.tencent.cn。

取消保存yarn资源调度的资源配置

默认接口请求频率限制:20次/秒。

接口更新时间:2025-09-11 21:44:45。

接口既验签名又鉴权。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数

参数名称 必选 允许NULL 类型 描述
Action String 公共参数,本接口取值:ModifyResourceScheduleConfigForRollback
Version String 公共参数,本接口取值:2019-01-03
Region String 公共参数,地域信息可通过DescribeRegions接口查看产品支持的地域列表
InstanceId String emr集群的英文id
示例值: tbds-664nmwbe
Key String 业务标识,fair表示公平的配置项,capacity表示容量的配置项
示例值: capacity

3. 输出参数

参数名称 类型 描述
OpenSwitch Bool 是否修改成功,true为成功
示例值: 1
Scheduler String 正在使用的资源调度器
示例值: 1
FSInfo String 公平调度器的信息
示例值: 1
CSInfo String 容量调度器的信息
示例值: 1
RangerYarnAuthorization Bool 是否开启ranger认证
示例值: 1
RequestId String 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。

4. 错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码

错误码 描述
InternalError 内部错误。
ResourceNotFound.InstanceNotFound 无法找到该实例。
InternalError.WoodServerError 内部服务调用异常。
InvalidParameter 参数错误。

5. 示例

示例1 取消保存yarn资源调度的资源配置

输入示例

POST / HTTP/1.1
Host: tbdsnew.api3.{conf.main_domain}
Content-Type: application/json
X-TC-Action: ModifyResourceScheduleConfigForRollback
<公共请求参数>

{
  "InstanceId": "tbds-664nmwbe",
  "Key": "capacity"
}

输出示例

{
  "Response": {
    "CSInfo": "{\"schedulerInfo\":{\"defaultSettings\":null,\"queue\":{\"acl_administer_queue\":{\"group\":\"hadoop\",\"user\":\"hadoop\"},\"acl_submit_applications\":{\"group\":\"hadoop\",\"user\":\"hadoop\"},\"configs\":[{\"configName\":\"default\",\"default-application-priority\":null,\"labels\":[{\"capacity\":null,\"labelName\":\"\\u003cDEFAULT_PARTITION\\u003e\",\"max-abs-capacity\":null,\"maximum-capacity\":null,\"min-abs-capacity\":null}],\"maximum-allocation-mb\":null,\"maximum-allocation-vcores\":null,\"maximum-am-resource-percent\":null,\"maximum-applications\":null,\"minimum-user-limit-percent\":null,\"user-limit-factor\":null,\"user-settings\":null}],\"default-node-label-expression\":null,\"isDefault\":null,\"isRoot\":true,\"myId\":\"root\",\"name\":\"root\",\"parentId\":\"root\",\"queues\":[{\"acl_administer_queue\":null,\"acl_submit_applications\":null,\"configs\":[{\"configName\":\"default\",\"default-application-priority\":null,\"labels\":[{\"capacity\":60,\"labelName\":\"\\u003cDEFAULT_PARTITION\\u003e\",\"max-abs-capacity\":null,\"maximum-capacity\":100,\"min-abs-capacity\":null}],\"maximum-allocation-mb\":null,\"maximum-allocation-vcores\":null,\"maximum-am-resource-percent\":null,\"maximum-applications\":null,\"minimum-user-limit-percent\":null,\"user-limit-factor\":1,\"user-settings\":null}],\"default-node-label-expression\":null,\"isDefault\":true,\"isRoot\":null,\"myId\":\"root.default\",\"name\":\"default\",\"parentId\":\"root\",\"queues\":[],\"state\":\"RUNNING\"},{\"acl_administer_queue\":{\"group\":null,\"user\":\"hadoop\"},\"acl_submit_applications\":{\"group\":null,\"user\":\"userA,userB\"},\"configs\":[{\"configName\":\"default\",\"default-application-priority\":null,\"labels\":[{\"capacity\":40,\"labelName\":\"\\u003cDEFAULT_PARTITION\\u003e\",\"max-abs-capacity\":null,\"maximum-capacity\":100,\"min-abs-capacity\":null}],\"maximum-allocation-mb\":null,\"maximum-allocation-vcores\":null,\"maximum-am-resource-percent\":0.25,\"maximum-applications\":10000,\"minimum-user-limit-percent\":null,\"user-limit-factor\":null,\"user-settings\":null}],\"default-node-label-expression\":null,\"isDefault\":false,\"isRoot\":false,\"myId\":\"root.Q1\",\"name\":\"Q1\",\"parentId\":\"root\",\"queues\":null,\"state\":\"RUNNING\"}],\"state\":null},\"queueMappings\":null,\"queueMappingsOverride\":null,\"version\":\"v2\"},\"labelSwitchInfo\":{\"enableLabel\":false,\"labelDir\":null,\"State\":1},\"labelInfo\":{\"labels\":[{\"name\":\"\\u003cDEFAULT_PARTITION\\u003e\",\"labelState\":1,\"unDeletable\":true,\"canNotChangeExclusive\":true,\"exclusive\":true,\"nodes\":null}],\"hasDraft\":false},\"hasDraft\":false,\"plans\":[{\"repeatType\":\"\",\"scheduleName\":\"default\",\"startTime\":\"\",\"duration\":null,\"daysOfRepeat\":null,\"isDefault\":true,\"disable\":false}]}",
    "FSInfo": "{\"schedulerInfo\":{\"users\":null,\"userMaxAppsDefault\":null,\"defaultFairSharePreemptionTimeout\":null,\"defaultFairSharePreemptionThreshold\":null,\"defaultMinSharePreemptionTimeout\":null,\"queueMaxAppsDefault\":null,\"defaultQueueSchedulingPolicy\":null,\"queueMaxAMShareDefault\":-1,\"queuePlacementPolicy\":null,\"queues\":[{\"name\":\"root\",\"type\":null,\"aclSubmitApps\":{\"user\":\"hadoop\",\"group\":\"hadoop\"},\"aclAdministerApps\":{\"user\":\"hadoop\",\"group\":\"hadoop\"},\"minSharePreemptionTimeout\":null,\"fairSharePreemptionTimeout\":null,\"fairSharePreemptionThreshold\":null,\"allowPreemptionFrom\":null,\"schedulingPolicy\":null,\"isDefault\":null,\"isRoot\":true,\"configSets\":[{\"name\":\"default\",\"minResources\":null,\"maxResources\":null,\"maxChildResources\":null,\"maxRunningApps\":null,\"weight\":null,\"maxAMShare\":-1}],\"queues\":[{\"name\":\"default\",\"type\":null,\"aclSubmitApps\":null,\"aclAdministerApps\":null,\"minSharePreemptionTimeout\":null,\"fairSharePreemptionTimeout\":null,\"fairSharePreemptionThreshold\":null,\"allowPreemptionFrom\":null,\"schedulingPolicy\":null,\"isDefault\":true,\"isRoot\":null,\"configSets\":[{\"name\":\"default\",\"minResources\":null,\"maxResources\":null,\"maxChildResources\":null,\"maxRunningApps\":null,\"weight\":null,\"maxAMShare\":null}],\"queues\":null},{\"name\":\"fair_test\",\"type\":null,\"aclSubmitApps\":null,\"aclAdministerApps\":null,\"minSharePreemptionTimeout\":null,\"fairSharePreemptionTimeout\":null,\"fairSharePreemptionThreshold\":null,\"allowPreemptionFrom\":null,\"schedulingPolicy\":\"fair\",\"isDefault\":null,\"isRoot\":null,\"configSets\":[{\"name\":\"default\",\"minResources\":{\"vcores\":null,\"memory\":null},\"maxResources\":{\"vcores\":null,\"memory\":null},\"maxChildResources\":null,\"maxRunningApps\":null,\"weight\":1,\"maxAMShare\":0.5}],\"queues\":[]}]}]},\"hasDraft\":false,\"plans\":[{\"repeatType\":\"\",\"scheduleName\":\"default\",\"startTime\":\"\",\"duration\":null,\"daysOfRepeat\":null,\"isDefault\":true,\"disable\":false}]}",
    "OpenSwitch": true,
    "RangerYarnAuthorization": true,
    "RequestId": "e72bc884-9c6f-4b4d-b9d6-deef7a1dfff7",
    "Scheduler": "{\"Name\":\"capacity\",\"FlowId\":null}"
  }
}