Creates a E-MapReduce cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateClusterV2 |
The operation that you want to perform. Set the value to CreateClusterV2. |
BootstrapAction.N.Name | String | Yes | init_script |
The name of the bootstrap action. |
BootstrapAction.N.Path | String | Yes | oss://bucket/path |
The OSS storage path of the boot action script. |
ClusterType | String | Yes | HADOOP |
The type of the cluster. Valid values:
|
Config.N.ConfigKey | String | Yes | fs.trash.interval |
The key of custom configuration item N. |
Config.N.ConfigValue | String | Yes | 60 |
The value of custom configuration item N. |
Config.N.FileName | String | Yes | yarn-site |
The name of the file that contains custom configuration item N. |
Config.N.ServiceName | String | Yes | YARN |
The name of the service for which custom configuration item N is configured. Specify the entire name in uppercase. |
EmrVer | String | Yes | EMR-3.35.0 |
The EMR version. Note You can view the EMR versions when you create a cluster in the console.
|
HostGroup.N.DiskCapacity | Integer | Yes | 80 |
The data disk capacity of host group N. |
HostGroup.N.DiskCount | Integer | Yes | 4 |
The number of data disks in host group N. |
HostGroup.N.DiskType | String | Yes | CLOUD_EFFICIENCY |
The data disk type of the machine group. Valid values:
|
HostGroup.N.HostGroupName | String | Yes | Master instance group |
The name of the machine group. |
HostGroup.N.HostGroupType | String | Yes | MASTER |
The type of the machine group. Valid values:
Note You can set only one group for both MASTER and CORE.
|
HostGroup.N.InstanceType | String | Yes | ecs.g6.2xlarge |
The instance type. For more information, see Instance families or call the DescribeInstanceTypes operation to query the most recent instance type list. |
HostGroup.N.NodeCount | Integer | Yes | 2 |
The number of nodes in host group N. |
HostGroup.N.SysDiskCapacity | Integer | Yes | 80 |
The system disk capacity of the machine group. Unit: GB. |
HostGroup.N.SysDiskType | String | Yes | CLOUD_SSD |
The system disk type of the machine group. Valid values:
|
Name | String | Yes | bi_hadoop |
The name of the cluster. The name must be 1 to 64 characters in length and can contain only letters, digits, hyphens (-), and underscores (_). |
RegionId | String | Yes | cn-hangzhou |
The region ID of the security group. You can call the DescribeRegions operation to query the most recent region list. |
UserInfo.N.Password | String | Yes | pwd |
The password of the Knox user. |
UserInfo.N.UserId | String | Yes | 123456789 |
The RAM user ID of the Knox user. |
UserInfo.N.UserName | String | Yes | username |
The username of the Knox user. |
ZoneId | String | Yes | cn-hangzhou-b |
The zone ID of the VNode. You can call the DescribeZones operation to query the most recent zone list. |
SecurityGroupId | String | No | sg-bp1id7ajv83kmqwq**** |
The ID of the security group. You can enter the ID of an existing security group. If the security group does not exist, a security group is automatically created. Note Parameter SecurityGroupId and SecurityGroupName requirements cannot be empty at the
same time.
|
IsOpenPublicIp | Boolean | No | true |
Specifies whether to enable a public IP address for the MASTER node. Valid values:
|
SecurityGroupName | String | No | emr-sg |
The name of the security group to be created. If you do not specify SecurityGroupId, a security group is created with the value of this parameter as its name. After the cluster is created, you can view the ID of the security group in cluster details. This security group will have the default security group policy: all ports are opened in the outbound direction. Note Parameter SecurityGroupId and SecurityGroupName requirements cannot be empty at the
same time.
|
ChargeType | String | No | PostPaid |
The billing type of the cluster. Valid values:
|
Period | Integer | No | 2 |
The subscription period. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36. Unit: months. This parameter is required when the ChargeType parameter is set to PrePaid. |
AutoRenew | Boolean | No | false |
Indicates whether the subscription cluster is auto-renewal. Valid values:
|
AutoPayOrder | Boolean | No | true |
Specifies whether to automatically pay. This parameter takes effect only when the billing method is PrePay. Valid values:
|
VpcId | String | No | vpc-bp1l4urd87xlh7i4b**** |
The ID of the VPC. |
VSwitchId | String | No | vsw-bp10tvjyc77psy0z5**** |
The IDs of vSwitches. |
NetType | String | No | VPC |
The network type of the instance. Set the value to VPC. |
UserDefinedEmrEcsRole | String | No | AliyunEmrEcsDefaultRole |
Role authorized to ECS for internal access to OSS and other Alibaba Cloud services:
|
OptionSoftWareList.N | RepeatList | No | ["ZOOKEEPER","LIVY"] |
Supported optional services. The service name needs to be capitalized. You can view the supported optional services on the Software Configuration page of the cluster created in the EMR console. Note You can specify an optional component. This parameter is limited in length. You must
specify no more than 20 service names. Otherwise, the extra parameters are discarded.
|
HighAvailabilityEnable | Boolean | No | true |
Specifies whether to enable high-availability clusters. Valid values:
The high-availability cluster has at least two MASTER nodes. If the high-availability cluster is not enabled, the high reliability of the cluster cannot be guaranteed. |
UseLocalMetaDb | Boolean | No | true |
Specifies whether to use the built-in MySQL database as the Hive metadatabase. Valid values:
The cluster has a built-in MySQL single node and cannot guarantee high reliability. |
MasterPwd | String | No | pwd |
The root password of the master node. The password must be 8 to 30 characters in length and contain three characters (uppercase letters, lowercase letters, digits, and special character). |
KeyPairName | String | No | test_pair |
Password-free logon to the ECS key pair. |
MetaStoreType | String | No | local |
The type of the Hive metadata service. Valid values:
|
MetaStoreConf | String | No | {"dbUrl":"jdbc:mysql://rm-xxxxxxxxxx.mysql.rds.aliyuncs.com/hmsdata?createDatabaseIfNotExist=true&characterEncoding=UTF-8","dbUserName":"xxxxxxx","dbPassword":"xxxxxx"} |
The configuration information of the unified metadata service. Valid values:
|
ClickHouseConf | String | No | None |
A reserved parameter. You do not need to specify this parameter. |
ExtraAttributes | String | No | None |
A reserved parameter. You do not need to specify this parameter. |
HostComponentInfo.N.HostName | String | No | emr-header-1 |
The target hostname of the component deployment. |
HostComponentInfo.N.ServiceName | String | No | HDFS |
The name of the service to which the component belongs. The service name is in uppercase letters, such as HDFS and ZOOKEEPER. Optional services can be obtained from the EMR console to create a cluster step 1-software configuration-service list view. |
HostComponentInfo.N.ComponentNameList.N | RepeatList | No | NAMENODE |
The components. |
ServiceInfo.N.ServiceName | String | No | HDFS |
The name of the service. The service name is in uppercase letters, such as HDFS and ZOOKEEPER. Optional services can be obtained from the EMR console to create a cluster step 1-software configuration-service list view. |
ServiceInfo.N.ServiceVersion | String | No | 2.3.3-1.0.2 |
The internal version of the service. |
PromotionInfo.N.PromotionOptionNo | String | No | 11080***0000 |
The coupon number. |
PromotionInfo.N.PromotionOptionCode | String | No | youhui_quan |
The type of the coupon. This parameter is optional. Default value: youhui_quan. |
PromotionInfo.N.ProductCode | String | No | ecs |
The product of the coupon application. Valid values:
|
DepositType | String | No | HALF_MANAGED |
The hosting type of the cluster. Set the value to HALF_MANAGED. Semi-managed indicates that the EMR cluster uses user-side ECS or ACK. |
MachineType | String | No | ECS |
The resource type of the IaaS layer to which the cluster is built. |
HostGroup.N.ClusterId | String | No | None |
A reserved parameter. You do not need to specify this parameter. |
HostGroup.N.HostGroupId | String | No | None |
A reserved parameter. You do not need to specify this parameter. |
HostGroup.N.Comment | String | No | None |
A reserved parameter. You do not need to specify this parameter. |
HostGroup.N.CreateType | String | No | None |
The type of the machine group creation. Valid values:
|
HostGroup.N.ChargeType | String | No | PostPaid |
The billing method of the instance. Valid values:
|
HostGroup.N.Period | Integer | No | 2 |
The subscription period. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36. Unit: months. Set this parameter when HostGroup.n.ChargeType is set to PrePaid. |
HostGroup.N.AutoRenew | Boolean | No | false |
machine group whether the machine is auto-renewal. Valid values:
|
HostGroup.N.VSwitchId | String | No | vsw-bp10tvjyc77psy0z5**** |
The IDs of vSwitches. |
HostGroup.N.GpuDriver | String | No | cuda9 |
The name of the GPU driver. |
HostGroup.N.PrivatePoolOptionsMatchCriteria | String | No | Target |
The type of the private pool. A private pool is generated after an elasticity assurance or a capacity reservation takes effect. You can select a private pool when you create instances. Valid values:
|
HostGroup.N.PrivatePoolOptionsId | String | No | crp-bp1e4wcvoucrish***** |
The ID of the private pool. The ID of a private pool is the same as that of the elasticity assurance or capacity reservation for which the private pool is generated. |
BootstrapAction.N.Arg | String | No | test1 test2 |
Boot operation parameters. If you need to specify multiple parameters, you can separate them with spaces. For
example, It is |
BootstrapAction.N.ExecutionTarget | String | No | core_group |
The scope of script execution. Valid values:
|
BootstrapAction.N.ExecutionMoment | String | No | BEFORE_INSTALL |
The execution timing of the script. Valid values:
|
BootstrapAction.N.ExecutionFailStrategy | String | No | FAILED_BLOCKED |
The script failure execution policy. Valid values:
|
UseCustomHiveMetaDB | Boolean | No | false |
A reserved parameter. You do not need to specify this parameter. |
InitCustomHiveMetaDB | Boolean | No | false |
A reserved parameter. You do not need to specify this parameter. |
Config.N.Encrypt | String | No | 0 |
A reserved parameter. You do not need to specify this parameter. |
Config.N.Replace | String | No | 0 |
A reserved parameter. You do not need to specify this parameter. |
Configurations | String | No | 0 |
A reserved parameter. You do not need to specify this parameter. |
EasEnable | Boolean | No | false |
Specifies whether to enable high security for the cluster. Valid values:
|
RelatedClusterId | String | No | C-D7958B72E59B**** |
The ID of the primary cluster that is associated with the current cluster if it is a gateway. |
WhiteListType | String | No | IP |
The type of the whitelist. Valid values:
|
AuthorizeContent | String | No | None |
A reserved parameter. You do not need to specify this parameter. |
Tag.N.Key | String | No | Dept |
The tag key of the EMR instance and node ECS instance. Valid values of N: 1 to 20. The tag key cannot be an empty string. Valid values: 1 to 128. It cannot start with aliyun or acs: and cannot contain http:// or https://. |
Tag.N.Value | String | No | DevIT |
The tag values of EMR instances and node ECS instances. Valid values of N: 1 to 20. The tag value can be an empty string. Valid values: 1 to 128. It cannot start with acs: and cannot contain http:// or https://. |
ResourceGroupId | String | No | rg-bp67acfmxazb4p**** |
The ID of the enterprise resource group to which the EMR cluster belongs. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-42665544**** |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ClusterId | String | C-D7958B72E59B**** |
The ID of the cluster. |
CoreOrderId | String | None |
The order ID of the core node. |
EmrOrderId | String | None |
The ID of the E-MapReduce order. |
MasterOrderId | String | None |
The order ID of the master node. |
RequestId | String | BF4FBAC6-B03E-4BFB-B6DB-EB53C34F2E22 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateClusterV2
&BootstrapAction.1.Name=name
&BootstrapAction.1.Path=oss://bucket/path
&ClusterType=HADOOP
&Config.1.ConfigKey=fs.trash.interval
&Config.1.ConfigValue=60
&Config.1.FileName=yarn-site
&Config.1.ServiceName=YARN
&EmrVer=EMR-3.15.0
&HostGroup.1.HostGroupType=MASTER
&HostGroup.1.InstanceType=ecs.mn4.2xlarge
&HostGroup.1.NodeCount=2
&Name=bi_hadoop
&RegionId=cn-hangzhou
&UserInfo.1.Password=pwd
&UserInfo.1.UserId=12345
&UserInfo.1.UserName=tom
&<Common request parameters>
Sample success responses
XML
format
<ClusterId>C-4DE6DA872B0E****</ClusterId>
<RequestId>F4DE89FB-7054-475C-B7E2-B9A38152DA7E</RequestId>
JSON
format
{
"ClusterId": "C-4DE6DA872B0E****",
"RequestId": "F4DE89FB-7054-475C-B7E2-B9A38152DA7E"
}