Change Queue Capacities

Run the following to change the queue properties.

Request URL

PUT
http://<cm_host>:7180/cmf/clusters/<Cluster-id>/queue-manager-api/api/v1/environments/support/clusters/<Cluster-id>/resources/scheduler/partitions/default/queues/<path-to-the-queue>

Request Body

{
  "properties": [
    { "name": "capacity", "value": "0" },
    { "name": "maximum-capacity", "value": "100" }
      "accessible-node-labels.<name-of-the-partition>.capacity":"<queue-capacity>",
      "accessible-node-labels.<name-of-the-partition>.maximum-capacity":"100",
      "accessible-node-labels.<name-of-the-partition>.capacity":"<queue-capacity>",
      "accessible-node-labels.<name-of-the-partition>.maximum-capacity":"100"
  ],
  "siblingCapacities": [
    {
      "queuePath": "root.default",
      "queueName": "default",
      "capacity": "100",
      "maximum-capacity": "100"
      "accessible-node-labels.<name-of-the-partition>.capacity":"<queue-capacity>",  
      "accessible-node-labels.<name-of-the-partition>.maximum-capacity":"100",
      "accessible-node-labels.<name-of-the-partition>.capacity":"<queue-capacity>",
      "accessible-node-labels.<name-of-the-partition>.maximum-capacity":"100"
    }
  ],
  "message": "Changed child capacities for root"
}

For information about Partitions, see https://docs.cloudera.com/runtime/7.3.1/yarn-allocate-resources/topics/yarn-configure-partition-a-cluster.html. For information about changing queue capacities, see https://docs.cloudera.com/runtime/7.3.1/yarn-allocate-resources/topics/yarn-configuring-cluster-capacity-with-queues.html.

Parameter Description
cm_host Cloudera Manager host address
Cluster-id Name of the cluster
queuePath Path to the queue
queueName Name of the queue
capacity Capacity of the queue
maximum-capacity Maximum capacity of the queue
name-of-the-partition Name of the partition

Example Request

curl -v -X PUT -b cookie.txt --key cm-auto-host_key_decrypted.pem --cert cm-auto-host_cert_chain.pem --cacert cm-auto-global_cacerts.pem -H "Referer: https://<cm_host>:7183/cmf/clusters/Cluster%201/queue-manager/" 

my-cluster-1.my-cluster.root.hwx.site:7180/cmf/clusters/Cluster201/queue-manager-api/api/v1/environments/support/clusters/Cluster201/resources/scheduler/partitions/default/queues/root.samplequeue -d @request.json