Create
To create a cluster with asynchronous operation, it is necessary to query the cluster state using describeCluster to determine whether the cluster has been successfully created. The entire process can take 5 minutes or more, and periodic queries are required to obtain the status.
Status: The
C_PROCESSINGis received by the server and the cluster is being processed;C_RUNNINGhas started running normally for the cluster and is available, indicating the cluster is created successfully.C_FAILEDfailed.
Parameters: CreateClusterRequest
- name:
String. Cluster name, for identification by user. - region:
String. Defaultec2.cn-north-1. - purpose:
String. Defaultemr. - keypar:
String. Used to log into master node. - groups:
List<AddInstanceGroupRequest>. Instance groups, including 4 roles,master,control,core,task. Each type must indicatetype,requestedInstanceCount.typerefers to the virtual machine type. The list of types is obtained from the server side.requestedInstanceCountrefers to the number of virtual machines created.- master: required.
- type:
String. - requestedInstanceCount:
int. Fixed value 1
- type:
- control: required.
- type:
String. - requestedInstanceCount:
int. Fixed value 3
- type:
- core: required.
- type:
String. - requestedInstanceCount:
int. Greater than or equal to 1
- type:
- task: optional.
- type:
InstanceGroupRole.TASK. - requestedInstanceCount:
int. Greater than or equal to 0
- type:
- master: required.
- Other: adding jobs at startup will be supported in the future, but is currently not supported.
Return: CreateClusterResponse
- name:
String. Same as thenamein the parameter - clusterId :
String. Allocated by server side, unique identification, describe, list, terminate are used. - groupIds:
List<String>. Corresponds toparameter groups, including the groupId of each group. - Other
Errors
- Internal server error
- Parameter error
- Insufficient permissions