Deleting partitions
Due to a known issue, COMPX-5106, it is not recommended to delete a partition if it is associated with queues and the queues have capacities configured for that partition.
Creating and Assigning Partitions
- Use Queue Manager to create a partition in the cluster using creating partitions.
- Assign this partition to some queues using assigning partitions with queues.
Deleting a Partition
- Disassociate partitions from queues using Disassociating partitions from queues.
- Removing configurations:
YARN’s mutation API is designed to be simple and very generic, it only handles key-value pairs. The unwanted capacities can be removed by using an existing mutation API in YARN. This is performed by setting values to an empty (“”) string (or null) and then those configurations will be removed from the in-memory config.
For example:{ "update-queue": [ { "queue-name": "root", "params": { "entry": [ { "key": "accessible-node-labels.label1.maximum-capacity", "value": "" }, { "key": "accessible-node-labels", "value": "*" }, { "key": "accessible-node-labels.label1.capacity", "value": "" } ] } }, { "queue-name": "root.a", "params": { "entry": [ { "key": "accessible-node-labels.label1.maximum-capacity", "value": "" }, { "key": "accessible-node-labels", "value": "" }, { "key": "accessible-node-labels.label1.capacity", "value": "" } ] } }, { "queue-name": "root.a.a1", "params": { "entry": [ { "key": "accessible-node-labels.label1.maximum-capacity", "value": "" }, { "key": "accessible-node-labels", "value": "" }, { "key": "accessible-node-labels.label1.capacity", "value": "" } ] } }, { "queue-name": "root.a.a2", "params": { "entry": [ { "key": "accessible-node-labels.label1.maximum-capacity", "value": "" }, { "key": "accessible-node-labels", "value": "" }, { "key": "accessible-node-labels.label1.capacity", "value": "" } ] } } ], "global": null, "global-updates": null }
{ "key": "accessible-node-labels.label1.capacity", "value": "" }
{ "key": "accessible-node-labels.label1.maximum-capacity", "value": "" }
As seen in the above JSON, add null or empty string values for all the queues where you want to clear values from the config.
- Delete the partition from Queue Manager UI partitions tab.