This is an automated email from the ASF dual-hosted git repository.
chia7712 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 a1697b1ec3 [YUNIKORN-2316] Update REST API docs for
/ws/v1/scheduler/node-utilizations (#392)
a1697b1ec3 is described below
commit a1697b1ec3c791ac0523b79f333324f6b15608b5
Author: Yu-Lin Chen <[email protected]>
AuthorDate: Mon Jan 15 00:56:40 2024 +0800
[YUNIKORN-2316] Update REST API docs for /ws/v1/scheduler/node-utilizations
(#392)
Closes: #392
Signed-off-by: Chia-Ping Tsai <[email protected]>
---
docs/api/scheduler.md | 80 ++++++++++++-
.../current/api/scheduler.md | 133 +++++++++++++++++++++
2 files changed, 212 insertions(+), 1 deletion(-)
diff --git a/docs/api/scheduler.md b/docs/api/scheduler.md
index a9db4cce26..b4ed89342a 100644
--- a/docs/api/scheduler.md
+++ b/docs/api/scheduler.md
@@ -1382,6 +1382,8 @@ Node details include host and rack name, capacity,
resources, utilization, and a
Show how every node is distributed with regard to dominant resource
utilization.
+**Status** : Deprecated since v1.5.0 and will be removed in the next major
release. Replaced with `/ws/v1/scheduler/node-utilizations`.
+
**URL** : `/ws/v1/scheduler/node-utilization`
**Method** : `GET`
@@ -1394,7 +1396,7 @@ Show how every node is distributed with regard to
dominant resource utilization.
**Content examples**
-```text
+```json
{
"type": "vcore",
"utilization": [
@@ -1432,6 +1434,82 @@ Show how every node is distributed with regard to
dominant resource utilization.
}
```
+## Node utilizations
+
+Show the nodes utilization of different types of resources in a cluster.
+
+**URL** : `/ws/v1/scheduler/node-utilizations`
+
+**Method** : `GET`
+
+**Auth required** : NO
+
+### Success response
+
+**Code** : `200 OK`
+
+**Content examples**
+
+```json
+[
+ {
+ "clusterId": "mycluster",
+ "partition": "default",
+ "utilizations": [
+ {
+ "type": "pods",
+ "utilization": [
+ {
+ "bucketName": "0-10%",
+ "numOfNodes": 2,
+ "nodeNames": [
+ "primary-node",
+ "second-node"
+ ]
+ },
+ {
+ "bucketName": "10-20%"
+ },
+ ...
+ ]
+ },
+ {
+ "type": "vcores",
+ "utilization": [
+ {
+ "bucketName": "0-10%",
+ "numOfNodes": 2,
+ "nodeNames": [
+ "primary-node",
+ "second-node"
+ ]
+ },
+ {
+ "bucketName": "10-20%"
+ },
+ ...
+ ]
+ },
+ ...
+ ]
+ }
+]
+```
+
+### 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: .."
+}
+```
+
## Goroutines info
Dumps the stack traces of the currently running goroutines.
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 a0bbfa8714..9325c4c03e 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
@@ -946,6 +946,139 @@ Yunikorn调度器能透过REST API来返回多个对象的信息
**示例**
+```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: .."
+}
+```
+
+## 节点主要资源使用率
+
+每个节点在主要资源利用率的分布。
+
+**状态 (Status)** : 自v1.5.0起已被弃用,并将在下一个主要版本中移除。替代为
`/ws/v1/scheduler/node-utilizations`。
+
+**位置(URL)** : `/ws/v1/scheduler/node-utilization`
+
+**方法(Method)** : `GET`
+
+**需求权限** : NO
+
+### 成功时的响应
+
+**返回代码** : `200 OK`
+
+**示例**
+
+```json
+{
+ "type": "vcore",
+ "utilization": [
+ {
+ "bucketName": "0-10%",
+ "numOfNodes": 1,
+ "nodeNames": [
+ "aethergpu"
+ ]
+ },
+ {
+ "bucketName": "10-20%",
+ "numOfNodes": 2,
+ "nodeNames": [
+ "primary-node",
+ "second-node"
+ ]
+ },
+ ...
+ ]
+}
+```
+
+### 错误时的响应
+
+**返回代码** : `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: .."
+}
+```
+
+## 节点资源使用率
+
+每个节点各种资源的利用率分布。
+
+**位置(URL)** : `/ws/v1/scheduler/node-utilizations`
+
+**方法(Method)** : `GET`
+
+**需求权限** : NO
+
+### 成功时的响应
+
+**返回代码** :`200 OK`
+
+**示例**
+
+```json
+[
+ {
+ "clusterId": "mycluster",
+ "partition": "default",
+ "utilizations": [
+ {
+ "type": "pods",
+ "utilization": [
+ {
+ "bucketName": "0-10%",
+ "numOfNodes": 2,
+ "nodeNames": [
+ "primary-node",
+ "second-node"
+ ]
+ },
+ {
+ "bucketName": "10-20%"
+ },
+ ...
+ ]
+ },
+ {
+ "type": "vcores",
+ "utilization": [
+ {
+ "bucketName": "0-10%",
+ "numOfNodes": 2,
+ "nodeNames": [
+ "primary-node",
+ "second-node"
+ ]
+ },
+ {
+ "bucketName": "10-20%"
+ },
+ ...
+ ]
+ },
+ ...
+ ]
+ }
+]
+```
+
+### 错误时的响应
+
+**返回代码** : `500 Internal Server Error`
+
+**示例**
+
+
```json
{
"status_code": 500,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]