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 path in which you want to store the bootstrap 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 version of EMR. Note You can view the EMR version list when you create a cluster in the console. |
HostGroup.N.DiskCapacity | Integer | Yes | 80 | The capacity of the machine group data disk. Unit: GB. |
HostGroup.N.DiskCount | Integer | Yes | 4 | The number of data disks in host group N. |
HostGroup.N.DiskType | String | Yes | CLOUD_EFFICIENCY | The type of the machine group data disk. 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 Both MASTER and CORE support setting up only one group. |
HostGroup.N.InstanceType | String | Yes | ecs.g6.2xlarge | The instance type. For more information, see Overview of 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 type of the machine group system disk. 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 command. You can call the DescribeRegions operation to query the most recent region list. |
UserInfo.N.Password | String | Yes | pwd | The password of the Knox account. |
UserInfo.N.UserId | String | Yes | 123456789 | The RAM user ID of the Knox account. |
UserInfo.N.UserName | String | Yes | username | The username of the Knox account. |
ZoneId | String | Yes | cn-hangzhou-b | The zone ID of the cluster. 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 an existing security group ID. If the security group does not exist, a security group is automatically created. Note Parameter SecurityGroupId and SecurityGroupName requirement cannot both be empty. |
IsOpenPublicIp | Boolean | No | true | Indicates whether the public IP address is enabled 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: open all ports in the outbound direction. Note Parameter SecurityGroupId and SecurityGroupName requirement cannot both be empty. |
ChargeType | String | No | PostPaid | The billing method 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 | Indices whether the cluster is auto-renewal. Valid values:
|
AutoPayOrder | Boolean | No | true | Specifies whether to enable automatic payment. This parameter takes effect only when the payment type is set to PrePay. Valid values:
|
VpcId | String | No | vpc-bp1l4urd87xlh7i4b**** | The ID of the virtual private cloud (VPC) to which the instances belong. |
VSwitchId | String | No | vsw-bp10tvjyc77psy0z5**** | The vSwitch ID of the cluster. |
NetType | String | No | VPC | Indicates the network type of the ApsaraDB RDS for MySQL instance. Set the value to VPC. |
UserDefinedEmrEcsRole | String | No | AliyunEmrEcsDefaultRole | The role that is authorized to ECS to access OSS and other Alibaba Cloud services:
|
OptionSoftWareList.N | RepeatList | No | ["ZOOKEEPER","LIVY"] | The optional service that is supported. The service name must be uppercase. You can view the supported optional services on the Software Configuration page of the created cluster in the EMR console. Note You can specify optional components. The length of this parameter is limited. You can specify no more than 20 service names. Otherwise, the extra parameters are discarded. |
HighAvailabilityEnable | Boolean | No | true | Specifies whether to enable the high-availability cluster. Valid values:
A high-availability cluster has at least two master nodes. If the high-availability cluster is not enabled, high reliability cannot be guaranteed. |
UseLocalMetaDb | Boolean | No | true | Specifies whether to use the built-in MySQL database of the cluster as the Hive metadatabase. Valid values:
A single MySQL node is built in a cluster 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 any 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 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. You can view the optional services in Step 1-Software Configuration-Service List to create a cluster in the EMR console. |
HostComponentInfo.N.ComponentNameList.N | RepeatList | No | NAMENODE | The information about the array object. |
ServiceInfo.N.ServiceName | String | No | HDFS | The name of the service. The service name is in uppercase letters, such as HDFS and ZOOKEEPER. You can view the optional services in Step 1-Software Configuration-Service List to create a cluster in the EMR console. |
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 ID. |
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 to which the coupon is applied. Valid values:
|
DepositType | String | No | HALF_MANAGED | The hosting type of the cluster. Set the value to HALF_MANAGED. Semi-hosted indicates that the EMR cluster uses a user-side ECS or ACK cluster. |
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. 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 vSwitch ID of the cluster. |
HostGroup.N.GpuDriver | String | No | cuda9 | The name of the GPU driver. |
HostGroup.N.PrivatePoolOptionsMatchCriteria | String | No | Target | The type of the private pool to use to create the instance. A private pool is generated when an elasticity assurance or a capacity reservation takes effect. You can select a private pool when you create an instance. Valid values:
|
HostGroup.N.PrivatePoolOptionsId | String | No | crp-bp1e4wcvoucrish***** | The ID of the private pool to use to create the instance. 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. This is the |
BootstrapAction.N.ExecutionTarget | String | No | core_group | The execution scope of the script. Valid values:
|
BootstrapAction.N.ExecutionMoment | String | No | BEFORE_INSTALL | The timing of the script. Valid values:
|
BootstrapAction.N.ExecutionFailStrategy | String | No | FAILED_BLOCKED | The execution policy for script failures. 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 cluster that is associated with the primary cluster if the current cluster 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 the node ECS instance. You can specify 1 to 20 tag keys. The tag value cannot be an empty string. The value of a tag key ranges from 1 to 128. It cannot start with aliyun or acs:, and cannot contain http:// or https://. |
Tag.N.Value | String | No | DevIT | The tag value of the EMR instance and the node ECS instance. You can specify 1 to 20 tag values. It can be an empty string. Valid values of tag values: 1 to 128. The tag value cannot start with acs: and cannot contain http:// or https://. |
ResourceGroupId | String | No | rg-bp67acfmxazb4p**** | The ID of the 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 a client token. Make sure that a unique client token is used for each request. |
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 | E-MapReduce order ID. |
MasterOrderId | String | None | The order ID of the master node. |
RequestId | String | BF4FBAC6-B03E-4BFB-B6DB-EB53C34F2E22 | The request ID. |
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"
}