...
Code Block |
---|
PUT /api/cluster/flexup // Expands the size of the YARN cluster. PUT /api/cluster/flexdown // Shrinks the size of the YARN cluster. |
Parameters include:
Parameter | Description |
---|---|
profile | Value: zero, small, medium, large. Default: zero. The instance size in the cluster is defined in the myriad-config-default.yml file. |
instances | Value: one (1) to the number of nodes in the cluster. For example, if there are 100 nodes in your cluster, you are bound by 100. If you specify more than 100, the excess is place in a pending state. |
constraints | Value: <hostname>??. Hostnames are used to define cluster boundary and to start and stop Node Managers on a predefined set of nodes. |
...
Code Block |
---|
PUT /api/cluster/flexup HTTP/1.1 Host: 10.10.100.19:8192 Connection: keep-alive Content-Length: 36 Origin: http://10.10.100.19:8192 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36 Content-Type: application/json Accept: */* Referer: http://10.10.100.19:8192/ Accept-Encoding: gzip, deflate, sdch Accept-Language: en-US,en;q=0.8 |
Request payload for one instance Launches a Node Manager with the profile set to medium on any host in the Mesos cluster:
Code Block |
---|
{profile: "medium", instances: "1"} |
Request payload for one instance Launches a Node Manager with the profile set to small on any host in the Mesos cluster:
Code Block |
---|
{ "instances":1, "profile": "small" } |
Request payload for one instance Launches a Node Manager with the profile set to zero on any host in the Mesos cluster with the profile set to zero:
Code Block |
---|
{
"instances":1
} |
Launches four (4) Node Managers with profile set to large only on hosts host-120 through host-129:
Code Block |
---|
{
"instances":4,
"profile": large,
"constraints": [hostname LIKE host-12[0-9].example.com]
} |
Launches two (2) Node Managers with profile set to zero only on hosts sharing a common Mesos slave attribute (http://mesos.apache.org/documentation/attributes-resources):
Code Block |
---|
{ "instances":2, "profile": zero, "instancesconstraints":1 } [hdfs LIKE true] } |
Response Example
Code Block |
---|
200202 okACCEPTED |