This is an automated email from the ASF dual-hosted git repository.
wwei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-yunikorn-site.git
The following commit(s) were added to refs/heads/master by this push:
new 91ff68e [YUNIKORN-405] Document config update API (#29)
91ff68e is described below
commit 91ff68eeefea60f34e22d0707395890a99e50a9b
Author: Kinga Marton <[email protected]>
AuthorDate: Sat Apr 10 00:07:01 2021 +0200
[YUNIKORN-405] Document config update API (#29)
---
docs/api/cluster.md | 39 ++++++++++++++-
docs/api/scheduler.md | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 166 insertions(+), 1 deletion(-)
diff --git a/docs/api/cluster.md b/docs/api/cluster.md
index bae308c..3c134b8 100644
--- a/docs/api/cluster.md
+++ b/docs/api/cluster.md
@@ -59,4 +59,41 @@ As an example, here is a response from a 2-node cluster with
3 applications and
}
]
```
-
\ No newline at end of file
+
+## Clusters utilization
+
+Returns statistical data related the cluster resource utilization
+
+**URL** : `/ws/v1/clusters/utilization`
+
+**Method** : `GET`
+
+**Auth required** : NO
+
+### Success response
+
+**Code** : `200 OK`
+
+**Content examples**
+
+```json
+[
+ {
+ "partition": "[mycluster]default",
+ "utilization": [
+ {
+ "type": "memory",
+ "total": 5076,
+ "used": 1500,
+ "usage": "29%"
+ },
+ {
+ "type": "vcore",
+ "total": 4000,
+ "used": 300,
+ "usage": "7%"
+ }
+ ]
+ }
+]
+```
diff --git a/docs/api/scheduler.md b/docs/api/scheduler.md
index d8e9452..ccd111c 100644
--- a/docs/api/scheduler.md
+++ b/docs/api/scheduler.md
@@ -245,6 +245,42 @@ Here you can see an example response from a 2-node cluster
having 3 allocations.
]
```
+## Nodes utilization
+
+Shows how nodes are distributed with regarding the utilization
+
+**URL** : `/ws/v1/nodes/utilization`
+
+**Method** : `GET`
+
+**Auth required** : NO
+
+**Code** : `200 OK`
+
+**Content examples**
+
+```text
+[
+ {
+ partition: default,
+ utilization: [ {
+ type: "cpu",
+ total: 100,
+ used: 50,
+ usage: 50%
+ },
+ {
+ type: "memory",
+ total: 1000,
+ used: 500,
+ usage: 50%
+ }
+ ]
+ },
+ ...
+]
+```
+
## Goroutines info
Dumps the stack traces of the currently running goroutines.
@@ -433,6 +469,98 @@ Reponse
"reason": "yaml: unmarshal errors:\n line 7: cannot unmarshal !!str
`wrong_text` into configs.PartitionConfig"
}
```
+## Configuration
+
+Endpoint to retrieve the current scheduler configuration
+
+**URL** : `/ws/v1/config`
+
+**Method** : `GET`
+
+**Auth required** : NO
+
+### Success response
+
+**Code** : `200 OK`
+
+**Content example**
+
+```yaml
+partitions:
+- name: default
+ queues:
+ - name: root
+ parent: true
+ submitacl: '*'
+ placementrules:
+ - name: tag
+ create: true
+ value: namespace
+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
+```
+
+### Failure response
+
+The configuration update can fail due to invalid configuration
+
+In this case the transaction will be rolled back, 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: "512"
+ vcore: "1"
+ properties:
+ application.sort.policy: stateaware
+```
## Application history