You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by wi...@apache.org on 2023/02/20 09:53:12 UTC

[yunikorn-site] branch master updated: [YUNIKORN-1586] update configuration REST API (#266)

This is an automated email from the ASF dual-hosted git repository.

wilfreds pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 3b6c63f51 [YUNIKORN-1586] update configuration REST API (#266)
3b6c63f51 is described below

commit 3b6c63f516dcdccc36f0c7bfe14ae04053c7291d
Author: wusamzong <t3...@gmail.com>
AuthorDate: Mon Feb 20 20:46:25 2023 +1100

    [YUNIKORN-1586] update configuration REST API (#266)
    
    Remove configuration PUT and POST calls from the docs
    
    Closes: #266
    
    Signed-off-by: Wilfred Spiegelenburg <wi...@apache.org>
---
 docs/api/scheduler.md                              | 178 --------------------
 .../current/api/scheduler.md                       | 180 ---------------------
 2 files changed, 358 deletions(-)

diff --git a/docs/api/scheduler.md b/docs/api/scheduler.md
index 66eddfb2d..c13a973c5 100644
--- a/docs/api/scheduler.md
+++ b/docs/api/scheduler.md
@@ -1055,99 +1055,6 @@ Reponse
 }
 ```
 
-## Configuration Create
-
-Endpoint to create scheduler configuration, but currently limited for configuration validation purpose alone
-
-**URL** : `/ws/v1/config`
-
-**Method** : `POST`
-
-**Query Params** : 
-
-1. dry_run
-
-Mandatory Parameter. Only dry_run=1 is allowed and can be used for configuration validation only, not for the actual config creation.
-
-**Auth required** : NO
-
-### Success response
-
-Regardless whether the configuration is allowed or not if the server was able to process the request, it will yield a 200 HTTP status code.
-
-**Code** : `200 OK`
-
-#### Allowed configuration
-
-Sending the following simple configuration yields an accept
-
-```yaml
-partitions:
-  - name: default
-    queues:
-      - name: root
-        queues:
-          - name: test
-```
-
-Response
-
-```json
-{
-    "allowed": true,
-    "reason": ""
-}
-```
-
-#### Disallowed configuration
-
-The following configuration is not allowed due to the "wrong_text" field put into the yaml file.
-
-```yaml
-partitions:
-  - name: default
-    queues:
-      - name: root
-        queues:
-          - name: test
-  - wrong_text
-```
-
-Response
-
-```json
-{
-    "allowed": false,
-    "reason": "yaml: unmarshal errors:\n  line 7: cannot unmarshal !!str `wrong_text` into configs.PartitionConfig"
-}
-```
-
-### Error response
-
-**Code** : `400 Bad Request`
-
-**Content examples**
-
-```json
-{
-    "status_code": 400,
-    "message": "Dry run param is missing. Please check the usage documentation",
-    "description": "Dry run param is missing. Please check the usage documentation"
-}
-```
-
-**Code** : `500 Internal Server Error`
-
-**Content examples**
-
-```json
-{
-    "status_code": 500,
-    "message": "system error message. for example, json: invalid UTF-8 in string: ..",
-    "description": "system error message. for example, json: invalid UTF-8 in string: .."
-}
-```
-
 ## Configuration
 
 Endpoint to retrieve the current scheduler configuration
@@ -1178,91 +1085,6 @@ partitions:
 checksum: D75996C07D5167F41B33E27CCFAEF1D5C55BE3C00EE6526A7ABDF8435DB4078E
 ```
 
-## Configuration update
-
-Endpoint to override scheduler configuration. 
-
-**URL** : `/ws/v1/config`
-
-**Method** : `PUT`
-
-**Auth required** : NO
-
-### Success response
-
-**Code** : `200 OK`
-
-**Content example**
-
-```yaml
-partitions:
-  -
-    name: default
-    placementrules:
-      - name: tag
-        value: namespace
-        create: true
-    queues:
-      - name: root
-        submitacl: '*'
-        properties:
-          application.sort.policy: stateaware
-checksum: BAB3D76402827EABE62FA7E4C6BCF4D8DD9552834561B6B660EF37FED9299791
-```
-**Note:** Updates must use a current running configuration as the base. 
-The base configuration is the configuration version that was retrieved earlier via a GET request and updated by the user.
-The update request must contain the checksum of the _base_ configuration. 
-If the checksum provided in the update request differs from the currently running configuration checksum the update will be rejected.
-
-### Failure response
-
-The configuration update can fail due to different reasons such as:
-- invalid configuration,
-- incorrect base checksum.
-
-In each case the transaction will be rejected, and the proper
-error message will be returned as a response.
-
-**Code** : `409 Conflict`
-
-**Message example** :  root queue must not have resource limits set
-
-**Content example**
-
-```yaml
-partitions:
-  -
-    name: default
-    placementrules:
-      - name: tag
-        value: namespace
-        create: true
-    queues:
-      - name: root
-        submitacl: '*'
-        resources:
-          guaranteed:
-            memory: "512M"
-            vcore: "1"
-        properties:
-          application.sort.policy: stateaware
-checksum: BAB3D76402827EABE62FA7E4C6BCF4D8DD9552834561B6B660EF37FED9299791
-```
-
-### Error response
-
-**Code** : `500 Internal Server Error`
-
-**Content examples**
-
-```json
-{
-    "status_code": 500,
-    "message": "system error message. for example, json: invalid UTF-8 in string: ..",
-    "description": "system error message. for example, json: invalid UTF-8 in string: .."
-}
-```
-
 ## Application history
 
 Endpoint to retrieve historical data about the number of total applications by timestamp.
diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/current/api/scheduler.md b/i18n/zh-cn/docusaurus-plugin-content-docs/current/api/scheduler.md
index 5bf579dfc..d464c57d0 100644
--- a/i18n/zh-cn/docusaurus-plugin-content-docs/current/api/scheduler.md
+++ b/i18n/zh-cn/docusaurus-plugin-content-docs/current/api/scheduler.md
@@ -1023,99 +1023,6 @@ partitions:
 }
 ```
 
-## 创建配置
-
-用于创建调度器配置的端点,但目前仅为「验证配置」而设置。
-
-**位置(URL)**:`/ws/v1/config`
-
-**方法(Method)**:`POST`
-
-**查询参数**:
-
-1. dry_run
-
-强制(Mandatory)参数。只允许dry_run=1,并且只能用于验证配置,而不能用于实际创建配置。
-
-**需求权限**:无
-
-### 成功时的响应
-
-无论配置是否被允许,如果服务器能够处理请求,它都将生成一个200HTTP状态代码。
-
-**代码**:`200 OK`
-
-#### 允许的配置
-
-发送以下简单配置会被接受
-
-```yaml
-partitions:
-  - name: default
-    queues:
-      - name: root
-        queues:
-          - name: test
-```
-
-返回
-
-```json
-{
-    "allowed": true,
-    "reason": ""
-}
-```
-
-#### 不允许的配置
-
-由于以下的的yaml档案中包含了“wrong_text”字段,因此是不允许的配置。
-
-```yaml
-partitions:
-  - name: default
-    queues:
-      - name: root
-        queues:
-          - name: test
-  - wrong_text
-```
-
-返回
-
-```json
-{
-    "allowed": false,
-    "reason": "yaml: unmarshal errors:\n  line 7: cannot unmarshal !!str `wrong_text` into configs.PartitionConfig"
-}
-```
-
-### 错误时的响应
-
-**返回代码** : `400 Bad Request`
-
-**示例**
-
-```json
-{
-    "status_code": 400,
-    "message": "Dry run param is missing. Please check the usage documentation",
-    "description": "Dry run param is missing. Please check the usage documentation"
-}
-```
-
-**返回代码** : `500 Internal Server Error`
-
-**示例**
-
-```json
-{
-    "status_code": 500,
-    "message": "system error message. for example, json: invalid UTF-8 in string: ..",
-    "description": "system error message. for example, json: invalid UTF-8 in string: .."
-}
-```
-
 ## 配置
 
 检索当前调度器配置的端点
@@ -1146,93 +1053,6 @@ partitions:
 checksum: D75996C07D5167F41B33E27CCFAEF1D5C55BE3C00EE6526A7ABDF8435DB4078E
 ```
 
-## 配置更新
-
-更新调度器配置的端点
-
-**位置(URL)** : `/ws/v1/config`
-
-**方法(Method)** : `PUT`
-
-**需求权限**:无
-
-### 成功时的响应
-
-**返回代码** : `200 OK`
-
-**示例**
-
-```yaml
-partitions:
-  -
-    name: default
-    placementrules:
-      - name: tag
-        value: namespace
-        create: true
-    queues:
-      - name: root
-        submitacl: '*'
-        properties:
-          application.sort.policy: stateaware
-checksum: BAB3D76402827EABE62FA7E4C6BCF4D8DD9552834561B6B660EF37FED9299791
-```
-**注记:**
-
-配置的更新是以「目前正在使用的配置」为准。
-而「目前正在使用的配置」的版本可以透过先前提及的GET请求而得。
-更新请求必须包含字段为_base_的校验码(checksum)。
-若更新请求中提供的校验码与当前运行的校验码不同,则将拒绝更新。
-
-### 错误时的响应
-
-更新配置可能会基于以下的原因而失败:
--无效的配置
--错误的验证码
-
-在以上情况下,更新都将被拒绝
-响应将返回错误消息。
-
-**代码** : `409 Conflict`
-
-**消息的示例** :  root queue must not have resource limits set
-
-**示例**
-
-```yaml
-partitions:
-  -
-    name: default
-    placementrules:
-      - name: tag
-        value: namespace
-        create: true
-    queues:
-      - name: root
-        submitacl: '*'
-        resources:
-          guaranteed:
-            memory: "512M"
-            vcore: "1"
-        properties:
-          application.sort.policy: stateaware
-checksum: BAB3D76402827EABE62FA7E4C6BCF4D8DD9552834561B6B660EF37FED9299791
-```
-
-### 错误时的响应
-
-**返回代码** : `500 Internal Server Error`
-
-**示例**
-
-```json
-{
-    "status_code": 500,
-    "message": "system error message. for example, json: invalid UTF-8 in string: ..",
-    "description": "system error message. for example, json: invalid UTF-8 in string: .."
-}
-```
-
 ## 应用程序历史
 
 检索历史数据的端点,依据时间来条列应用程序的总数。