Skip to content

Cluster

This class encapsulates and extends the ROS resource type ALIYUN::EMR::Cluster, which is used to create an E-MapReduce (EMR) cluster.

Initializers

import com.aliyun.ros.cdk.emr.Cluster;
Cluster.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .chargeType(java.lang.String)
    .chargeType(IResolvable)
    .clusterType(java.lang.String)
    .clusterType(IResolvable)
    .emrVer(java.lang.String)
    .emrVer(IResolvable)
    .hostGroup(IResolvable)
    .hostGroup(java.util.List<IResolvable)
    .hostGroup(HostGroupProperty>)
    .name(java.lang.String)
    .name(IResolvable)
    .netType(java.lang.String)
    .netType(IResolvable)
    .useLocalMetaDb(java.lang.Boolean)
    .useLocalMetaDb(IResolvable)
    .zoneId(java.lang.String)
    .zoneId(IResolvable)
//  .authorizeContent(java.lang.String)
//  .authorizeContent(IResolvable)
//  .autoRenew(java.lang.Boolean)
//  .autoRenew(IResolvable)
//  .bootstrapAction(IResolvable)
//  .bootstrapAction(java.util.List<IResolvable)
//  .bootstrapAction(BootstrapActionProperty>)
//  .clickHouseConf(IResolvable)
//  .clickHouseConf(java.util.Map<java.lang.String, java.lang.Object>)
//  .config(IResolvable)
//  .config(java.util.List<IResolvable)
//  .config(ConfigProperty>)
//  .configurations(java.lang.String)
//  .configurations(IResolvable)
//  .depositType(java.lang.String)
//  .depositType(IResolvable)
//  .easEnable(java.lang.Boolean)
//  .easEnable(IResolvable)
//  .highAvailabilityEnable(java.lang.Boolean)
//  .highAvailabilityEnable(IResolvable)
//  .initCustomHiveMetaDb(java.lang.Boolean)
//  .initCustomHiveMetaDb(IResolvable)
//  .instanceGeneration(java.lang.String)
//  .instanceGeneration(IResolvable)
//  .ioOptimized(java.lang.Boolean)
//  .ioOptimized(IResolvable)
//  .isOpenPublicIp(java.lang.Boolean)
//  .isOpenPublicIp(IResolvable)
//  .keyPairName(java.lang.String)
//  .keyPairName(IResolvable)
//  .logPath(java.lang.String)
//  .logPath(IResolvable)
//  .machineType(java.lang.String)
//  .machineType(IResolvable)
//  .masterPwd(java.lang.String)
//  .masterPwd(IResolvable)
//  .metaStoreConf(java.lang.String)
//  .metaStoreConf(IResolvable)
//  .metaStoreType(java.lang.String)
//  .metaStoreType(IResolvable)
//  .optionSoftWareList(IResolvable)
//  .optionSoftWareList(java.util.List<java.lang.String)
//  .optionSoftWareList(IResolvable>)
//  .period(java.lang.Number)
//  .period(IResolvable)
//  .relatedClusterId(java.lang.String)
//  .relatedClusterId(IResolvable)
//  .resourceGroupId(java.lang.String)
//  .resourceGroupId(IResolvable)
//  .securityGroupId(java.lang.String)
//  .securityGroupId(IResolvable)
//  .securityGroupName(java.lang.String)
//  .securityGroupName(IResolvable)
//  .sshEnable(java.lang.Boolean)
//  .sshEnable(IResolvable)
//  .tags(java.util.List<TagsProperty>)
//  .useCustomHiveMetaDb(java.lang.Boolean)
//  .useCustomHiveMetaDb(IResolvable)
//  .userDefinedEmrEcsRole(java.lang.String)
//  .userDefinedEmrEcsRole(IResolvable)
//  .userInfo(IResolvable)
//  .userInfo(java.util.List<IResolvable)
//  .userInfo(UserInfoProperty>)
//  .vpcId(java.lang.String)
//  .vpcId(IResolvable)
//  .vSwitchId(java.lang.String)
//  .vSwitchId(IResolvable)
//  .whiteListType(java.lang.String)
//  .whiteListType(IResolvable)
    .build();
Name Type Description
scope com.aliyun.ros.cdk.core.Construct No description.
id java.lang.String No description.
enableResourcePropertyConstraint java.lang.Boolean No description.
chargeType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property chargeType: The billing method.
clusterType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property clusterType: The type of the cluster.
emrVer java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property emrVer: The version of EMR.
hostGroup com.aliyun.ros.cdk.core.IResolvable OR java.util.ListHostGroupProperty> Property hostGroup:.
name java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property name: The name of the cluster.
netType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property netType: The type of the network.
useLocalMetaDb java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property useLocalMetaDb: Indicates whether the local Hive metadatabase is used.
zoneId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property zoneId: The zone ID.
authorizeContent java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property authorizeContent: Not required.
autoRenew java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property autoRenew: Indicates whether the subscription cluster is auto-renewed.
bootstrapAction com.aliyun.ros.cdk.core.IResolvable OR java.util.ListBootstrapActionProperty> Property bootstrapAction:.
clickHouseConf com.aliyun.ros.cdk.core.IResolvable OR java.util.Map Property clickHouseConf: undefined.
config com.aliyun.ros.cdk.core.IResolvable OR java.util.ListConfigProperty> Property config:.
configurations java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property configurations: Not required.
depositType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property depositType: The hosting type.
easEnable java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property easEnable: Indicates whether the cluster is a high-security cluster.
highAvailabilityEnable java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property highAvailabilityEnable: Indicates whether the cluster is a high-availability cluster.
initCustomHiveMetaDb java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property initCustomHiveMetaDb: A reserved parameter.
instanceGeneration java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceGeneration: The generation of the ECS instances.
ioOptimized java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property ioOptimized: Indicates wether I\/O optimization is enabled.
isOpenPublicIp java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property isOpenPublicIp: Indicates whether a public IP address is assigned.
keyPairName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property keyPairName: The name of the key pair.
logPath java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property logPath: The log path in OSS.
machineType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property machineType: The type of the machine.
masterPwd java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property masterPwd: The SSH password for the master node.
metaStoreConf java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property metaStoreConf: Meta store conf of specific meta store type.
metaStoreType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property metaStoreType: Meta store type.
optionSoftWareList com.aliyun.ros.cdk.core.IResolvable OR java.util.List Property optionSoftWareList: The list of optional services.
period java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property period: The length of the subscription.
relatedClusterId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property relatedClusterId: The ID of the primary cluster (when the cluster that you create is a Gateway cluster).
resourceGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property resourceGroupId: Resource group id.
securityGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property securityGroupId: The ID of the security group.
securityGroupName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property securityGroupName: The name of the security group to create.
sshEnable java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property sshEnable: Indicates whether SSH is enabled.
tags java.util.List<TagsProperty> Property tags: Tags to attach to instance.
useCustomHiveMetaDb java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property useCustomHiveMetaDb: A reserved parameter.
userDefinedEmrEcsRole java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property userDefinedEmrEcsRole: The role that is assigned to EMR for calling ECS resources.
userInfo com.aliyun.ros.cdk.core.IResolvable OR java.util.ListUserInfoProperty> Property userInfo:.
vpcId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vpcId: The ID of the VPC.
vSwitchId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vSwitchId: The ID of the Vswitch.
whiteListType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property whiteListType: Not required.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

chargeTypeRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property chargeType: The billing method.

Valid values: PostPaid and PrePaid. PostPaid: pay-as-you-go. PrePaid: subscription.


clusterTypeRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property clusterType: The type of the cluster.

Allowd values: HADOOP, KAFKA, DRUID, ZOOKEEPER, DATA_SCIENCE, GATEWAY etc.


emrVerRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property emrVer: The version of EMR.


hostGroupRequired

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListHostGroupProperty>

Property hostGroup:.


nameRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property name: The name of the cluster.

The name can be 1 to 64 characters in length and only contain Chinese characters, letters, numbers, hyphens (-), and underscores (_).


netTypeRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property netType: The type of the network.


useLocalMetaDbRequired

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property useLocalMetaDb: Indicates whether the local Hive metadatabase is used.


zoneIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property zoneId: The zone ID.


authorizeContentOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property authorizeContent: Not required.


autoRenewOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property autoRenew: Indicates whether the subscription cluster is auto-renewed.


bootstrapActionOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListBootstrapActionProperty>

Property bootstrapAction:.


clickHouseConfOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map

Property clickHouseConf: undefined.


configOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListConfigProperty>

Property config:.


configurationsOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property configurations: Not required.


depositTypeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property depositType: The hosting type.


easEnableOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property easEnable: Indicates whether the cluster is a high-security cluster.


highAvailabilityEnableOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property highAvailabilityEnable: Indicates whether the cluster is a high-availability cluster.

A value of true indicates that two master nodes are required.


initCustomHiveMetaDbOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property initCustomHiveMetaDb: A reserved parameter.

Not required.


instanceGenerationOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property instanceGeneration: The generation of the ECS instances.


ioOptimizedOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property ioOptimized: Indicates wether I\/O optimization is enabled.

Default value: true.


isOpenPublicIpOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property isOpenPublicIp: Indicates whether a public IP address is assigned.

A value of true indicates that a bandwidth of 8 MB is set by default.


keyPairNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property keyPairName: The name of the key pair.


logPathOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property logPath: The log path in OSS.


machineTypeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property machineType: The type of the machine.


masterPwdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property masterPwd: The SSH password for the master node.

The password must meet the following requirements. Length constraints: Minimum length of 8 characters. Maximum length of 30 characters. It must contain three types of characters (uppercase letters, lowercase letters, numbers, and special symbols).


metaStoreConfOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property metaStoreConf: Meta store conf of specific meta store type.

If MetaStoreType=user_rds, MetaStoreConf should be like {"dbUrl":"jdbc:mysql://xxxxxx", "dbUserName":"username", "dbPassword":"password"}


metaStoreTypeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property metaStoreType: Meta store type.

Allow types: local: Local cluster unified: Unified meta data user_rds: User's RDS


optionSoftWareListOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List

Property optionSoftWareList: The list of optional services.


periodOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property period: The length of the subscription.

Unit: months. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, and 36. A value is required when ChargeType=PrePaid.


relatedClusterIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property relatedClusterId: The ID of the primary cluster (when the cluster that you create is a Gateway cluster).


resourceGroupIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property resourceGroupId: Resource group id.


securityGroupIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property securityGroupId: The ID of the security group.

You can create a security group in the ECS console and use it. Note: If you use an existing security group, the default security group policy is applied to this security group: Only port 22 is open at the inbound and all ports are open at the outbound. You need to specify either SecurityGroupId or SecurityGroupName.


securityGroupNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property securityGroupName: The name of the security group to create.

If the ID of the security group is not specified, this name is used to create a new security group. After the cluster is created, you can view the ID of the security group on the Cluster Management page. The default security group policy is applied to this security group: Only port 22 is open at the inbound and all ports are open at the outbound. You need to specify either SecurityGroupId or SecurityGroupName.


sshEnableOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property sshEnable: Indicates whether SSH is enabled.


tagsOptional

Property tags: Tags to attach to instance.

Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.


useCustomHiveMetaDbOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property useCustomHiveMetaDb: A reserved parameter.

Not required.


userDefinedEmrEcsRoleOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property userDefinedEmrEcsRole: The role that is assigned to EMR for calling ECS resources.


userInfoOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListUserInfoProperty>

Property userInfo:.


vpcIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property vpcId: The ID of the VPC.

A value is required when NetType=vpc.


vSwitchIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property vSwitchId: The ID of the Vswitch.

A value is required when NetType=vpc.


whiteListTypeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property whiteListType: Not required.


Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
getAtt No description.
setMetadata No description.

toString

public java.lang.String toString()

Returns a string representation of this construct.

synthesize

public void synthesize(ISynthesisSession session)

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import com.aliyun.ros.cdk.emr.Cluster;
Cluster.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
ref java.lang.String No description.
stack com.aliyun.ros.cdk.core.Stack The stack in which this resource is defined.
resource com.aliyun.ros.cdk.core.RosResource No description.
attrClusterId com.aliyun.ros.cdk.core.IResolvable Attribute ClusterId: The ID of the cluster.
attrHostGroups com.aliyun.ros.cdk.core.IResolvable Attribute HostGroups: The host group list of the cluster.
attrMasterNodeInnerIps com.aliyun.ros.cdk.core.IResolvable Attribute MasterNodeInnerIps: The inner ip list of the cluster master nodes.
attrMasterNodePubIps com.aliyun.ros.cdk.core.IResolvable Attribute MasterNodePubIps: The public ip list of the cluster master nodes.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrClusterIdRequired

public IResolvable getAttrClusterId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ClusterId: The ID of the cluster.


attrHostGroupsRequired

public IResolvable getAttrHostGroups();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute HostGroups: The host group list of the cluster.


attrMasterNodeInnerIpsRequired

public IResolvable getAttrMasterNodeInnerIps();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute MasterNodeInnerIps: The inner ip list of the cluster master nodes.


attrMasterNodePubIpsRequired

public IResolvable getAttrMasterNodePubIps();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute MasterNodePubIps: The public ip list of the cluster master nodes.