YARN-9792. Document examples of SchedulerConf with Node Labels. Contributed by Prabhu Joseph
This commit is contained in:
parent
2e1fd44596
commit
0d2d6f9267
|
@ -5292,6 +5292,87 @@ Response Header:
|
|||
Content-Type: application/xml
|
||||
Transfer-Encoding: chunked
|
||||
|
||||
**Adding Node Labels to a queue**
|
||||
|
||||
Assuming we are using the capacity scheduler and the current queue configuration is two queues root.default, and root.a, this example adds a Node Label x to the queue root.a. Create a Node Label x and assign the nodes with below commands.
|
||||
|
||||
```yarn rmadmin -addToClusterNodeLabels "x(exclusive=true)"```
|
||||
|
||||
```yarn rmadmin -replaceLabelsOnNode "<nodeId>=x"```
|
||||
|
||||
HTTP Request:
|
||||
|
||||
```xml
|
||||
Accept: application/xml
|
||||
PUT http://rm-http-address:port/ws/v1/cluster/scheduler-conf
|
||||
Content-Type: application/xml
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<sched-conf>
|
||||
<update-queue>
|
||||
<queue-name>root.a</queue-name>
|
||||
<params>
|
||||
<entry>
|
||||
<key>accessible-node-labels</key>
|
||||
<value>x</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>accessible-node-labels.x.capacity</key>
|
||||
<value>100</value>
|
||||
</entry>
|
||||
</params>
|
||||
</update-queue>
|
||||
<update-queue>
|
||||
<queue-name>root</queue-name>
|
||||
<params>
|
||||
<entry>
|
||||
<key>accessible-node-labels.x.capacity</key>
|
||||
<value>100</value>
|
||||
</entry>
|
||||
</params>
|
||||
</update-queue>
|
||||
</sched-conf>
|
||||
```
|
||||
|
||||
|
||||
Response Header:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/xml
|
||||
Transfer-Encoding: chunked
|
||||
|
||||
**Removing Node Labels from a queue**
|
||||
|
||||
Assuming we are using the capacity scheduler and the current queue configuration is two queues root.default, and root.a and Node Label x is assigned to queue root.a. This example unsets the Node Label x from the queue root.a and removes it.
|
||||
|
||||
HTTP Request:
|
||||
|
||||
```xml
|
||||
Accept: application/xml
|
||||
PUT http://rm-http-address:port/ws/v1/cluster/scheduler-conf
|
||||
Content-Type: application/xml
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<sched-conf>
|
||||
<update-queue>
|
||||
<queue-name>root.a</queue-name>
|
||||
<params>
|
||||
<entry>
|
||||
<key>accessible-node-labels</key>
|
||||
<value></value>
|
||||
</entry>
|
||||
</params>
|
||||
</update-queue>
|
||||
</sched-conf>
|
||||
```
|
||||
|
||||
|
||||
Response Header:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/xml
|
||||
Transfer-Encoding: chunked
|
||||
|
||||
```yarn rmadmin -removeFromClusterNodeLabels x```
|
||||
|
||||
|
||||
Cluster Container Signal API
|
||||
--------------------------------
|
||||
|
|
Loading…
Reference in New Issue