Add a Node to a Cluster

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

Use this API to add a new worker node to the cluster. The instance type is picked up from the cluster configuration. This action starts the operation asynchronously. The operation can be monitored using the command ID in the response through the command status API.

Note

A cluster must be running to add a new node. An Add Node API does not check for maximum size of the cluster. Currently, this function is supported for Hadoop (Hive) and Presto clusters only.

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 adding nodes to a cluster. See Managing Groups and Managing Roles for more information.
curl -i -X POST -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" -d
'{"node_count": "$value"}' "https://api.qubole.com/api/v2.2/clusters/${cluster_id}/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.

Parameters

Note

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

Parameter Description
cluster_id It is the cluster ID of Hadoop (Hive) or Presto cluster’s ID.
node_count The total number of nodes. The default value of node count is 1. (Hadoop (Hive) or Presto)

Response

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

Example

Request

curl -X POST -H "X-AUTH-TOKEN:$X_AUTH_TOKEN" -H "Content-Type:application/json" -H "Accept: application/json" \
https://api.qubole.com//api/v2.2/clusters/353181/nodes

Note

The response is the same as a query_hist response.