Remove a Node from a Cluster

DELETE /api/v2.2/clusters/<<Cluster ID>/<Cluster Label>>/nodes

Use this API to remove a worker node from a cluster. This action starts the operation asynchronously. This API is supported only on Hadoop and Presto clusters.

In Hadoop/Presto clusters, nodes are removed from the cluster gracefully, which means that a node is only removed after tasks/jobs running on that particular node get completed. A node is only removed only if the current cluster size is greater than the configured minimum cluster size in Hadoop clusters. However, on a Presto cluster, a node is removed even when it is at its configured minimum cluster size.

The operation can be monitored using the command ID in the response through the command status API.

Note

A cluster must be running to remove a node. A Remove Node API does not check for maximum size of the cluster. Currently, this function is supported only on Hadoop and Presto clusters.

Required Role

The following roles can make this API call:

  • A user who is part of the system-admin group.

  • A user invoking this API must be part of a group associated with a role that allows removing nodes from an existing cluster. See Managing Groups and Managing Roles for more information.

Response

The response contains a JSON object representing the command ID of the remove node operation. All the attributes mentioned here are returned (except when otherwise specified or redundant).

Parameters

Note

Parameters marked in bold below are mandatory. Others are optional and have default values.

“Parameter”

“Description”

private_dns

Private DNS of the slave node.

Examples

Example 1 shows an example to remove nodes and Example 2 shows an example to remove nodes by passing the private DNS of the slave node.

Example 1

To remove nodes from a cluster with 277344 as its ID.

curl -X DELETE
-H "X-AUTH-TOKEN:$AUTH_TOKEN"
-H "Content-Type:application/json"
https://api.qubole.com/api/v2.2/clusters/277344/nodes

Note

The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.

Example 2

To remove nodes from a cluster by specifying the private DNS of the slave node.

curl -i -X DELETE -H "X-AUTH-TOKEN:$AUTH_TOKEN" -H "Content-Type:application/json" \
https://api.qubole.com/api/v2.2/clusters/<cluster-id>/nodes?private_dns=<private_dns>

Note

The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.