Remove a Node from a Cluster¶
Use this API to remove a worker node from a cluster. This action starts the operation asynchronously. This API is supported only on Hadoop 2 and Presto clusters.
In Hadoop 2/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 2/Presto clusters.
The operation can be monitored using the command ID in the response through the command status API.
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 2 and Presto clusters.
The following users can make this API call:
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 marked in bold below are mandatory. Others are optional and have default values.
|private_dns||Private DNS of the worker node.|
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://gcp.qubole.com/api/v2/clusters/277344/nodes
To remove nodes from a cluster by specifying the private DNS of the worker node.
curl -i -X DELETE -H "X-AUTH-TOKEN:$AUTH_TOKEN" -H "Content-Type:application/json" \ https://gcp.qubole.com/api/v2/clusters/<cluster-id>/nodes?private_dns=<private_dns>