Interface CfnCluster.JobFlowInstancesConfigProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnCluster.JobFlowInstancesConfigProperty.Jsii$Proxy
- Enclosing class:
CfnCluster
JobFlowInstancesConfig is a property of the AWS::EMR::Cluster resource.
JobFlowInstancesConfig defines the instance groups or instance fleets that comprise the cluster. JobFlowInstancesConfig must contain either InstanceFleetConfig or InstanceGroupConfig . They cannot be used together.
You can now define task instance groups or task instance fleets using the TaskInstanceGroups and TaskInstanceFleets subproperties. Using these subproperties reduces delays in provisioning task nodes compared to specifying task nodes with the InstanceFleetConfig and InstanceGroupConfig resources.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.emr.*;
ConfigurationProperty configurationProperty_;
JobFlowInstancesConfigProperty jobFlowInstancesConfigProperty = JobFlowInstancesConfigProperty.builder()
.additionalMasterSecurityGroups(List.of("additionalMasterSecurityGroups"))
.additionalSlaveSecurityGroups(List.of("additionalSlaveSecurityGroups"))
.coreInstanceFleet(InstanceFleetConfigProperty.builder()
.instanceTypeConfigs(List.of(InstanceTypeConfigProperty.builder()
.instanceType("instanceType")
// the properties below are optional
.bidPrice("bidPrice")
.bidPriceAsPercentageOfOnDemandPrice(123)
.configurations(List.of(ConfigurationProperty.builder()
.classification("classification")
.configurationProperties(Map.of(
"configurationPropertiesKey", "configurationProperties"))
.configurations(List.of(configurationProperty_))
.build()))
.customAmiId("customAmiId")
.ebsConfiguration(EbsConfigurationProperty.builder()
.ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
.volumeSpecification(VolumeSpecificationProperty.builder()
.sizeInGb(123)
.volumeType("volumeType")
// the properties below are optional
.iops(123)
.throughput(123)
.build())
// the properties below are optional
.volumesPerInstance(123)
.build()))
.ebsOptimized(false)
.build())
.priority(123)
.weightedCapacity(123)
.build()))
.launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder()
.onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder()
.allocationStrategy("allocationStrategy")
// the properties below are optional
.capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
.capacityReservationPreference("capacityReservationPreference")
.capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
.usageStrategy("usageStrategy")
.build())
.build())
.spotSpecification(SpotProvisioningSpecificationProperty.builder()
.timeoutAction("timeoutAction")
.timeoutDurationMinutes(123)
// the properties below are optional
.allocationStrategy("allocationStrategy")
.blockDurationMinutes(123)
.build())
.build())
.name("name")
.resizeSpecifications(InstanceFleetResizingSpecificationsProperty.builder()
.onDemandResizeSpecification(OnDemandResizingSpecificationProperty.builder()
.allocationStrategy("allocationStrategy")
.capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
.capacityReservationPreference("capacityReservationPreference")
.capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
.usageStrategy("usageStrategy")
.build())
.timeoutDurationMinutes(123)
.build())
.spotResizeSpecification(SpotResizingSpecificationProperty.builder()
.allocationStrategy("allocationStrategy")
.timeoutDurationMinutes(123)
.build())
.build())
.targetOnDemandCapacity(123)
.targetSpotCapacity(123)
.build())
.coreInstanceGroup(InstanceGroupConfigProperty.builder()
.instanceCount(123)
.instanceType("instanceType")
// the properties below are optional
.autoScalingPolicy(AutoScalingPolicyProperty.builder()
.constraints(ScalingConstraintsProperty.builder()
.maxCapacity(123)
.minCapacity(123)
.build())
.rules(List.of(ScalingRuleProperty.builder()
.action(ScalingActionProperty.builder()
.simpleScalingPolicyConfiguration(SimpleScalingPolicyConfigurationProperty.builder()
.scalingAdjustment(123)
// the properties below are optional
.adjustmentType("adjustmentType")
.coolDown(123)
.build())
// the properties below are optional
.market("market")
.build())
.name("name")
.trigger(ScalingTriggerProperty.builder()
.cloudWatchAlarmDefinition(CloudWatchAlarmDefinitionProperty.builder()
.comparisonOperator("comparisonOperator")
.metricName("metricName")
.period(123)
.threshold(123)
// the properties below are optional
.dimensions(List.of(MetricDimensionProperty.builder()
.key("key")
.value("value")
.build()))
.evaluationPeriods(123)
.namespace("namespace")
.statistic("statistic")
.unit("unit")
.build())
.build())
// the properties below are optional
.description("description")
.build()))
.build())
.bidPrice("bidPrice")
.configurations(List.of(ConfigurationProperty.builder()
.classification("classification")
.configurationProperties(Map.of(
"configurationPropertiesKey", "configurationProperties"))
.configurations(List.of(configurationProperty_))
.build()))
.customAmiId("customAmiId")
.ebsConfiguration(EbsConfigurationProperty.builder()
.ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
.volumeSpecification(VolumeSpecificationProperty.builder()
.sizeInGb(123)
.volumeType("volumeType")
// the properties below are optional
.iops(123)
.throughput(123)
.build())
// the properties below are optional
.volumesPerInstance(123)
.build()))
.ebsOptimized(false)
.build())
.market("market")
.name("name")
.build())
.ec2KeyName("ec2KeyName")
.ec2SubnetId("ec2SubnetId")
.ec2SubnetIds(List.of("ec2SubnetIds"))
.emrManagedMasterSecurityGroup("emrManagedMasterSecurityGroup")
.emrManagedSlaveSecurityGroup("emrManagedSlaveSecurityGroup")
.hadoopVersion("hadoopVersion")
.keepJobFlowAliveWhenNoSteps(false)
.masterInstanceFleet(InstanceFleetConfigProperty.builder()
.instanceTypeConfigs(List.of(InstanceTypeConfigProperty.builder()
.instanceType("instanceType")
// the properties below are optional
.bidPrice("bidPrice")
.bidPriceAsPercentageOfOnDemandPrice(123)
.configurations(List.of(ConfigurationProperty.builder()
.classification("classification")
.configurationProperties(Map.of(
"configurationPropertiesKey", "configurationProperties"))
.configurations(List.of(configurationProperty_))
.build()))
.customAmiId("customAmiId")
.ebsConfiguration(EbsConfigurationProperty.builder()
.ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
.volumeSpecification(VolumeSpecificationProperty.builder()
.sizeInGb(123)
.volumeType("volumeType")
// the properties below are optional
.iops(123)
.throughput(123)
.build())
// the properties below are optional
.volumesPerInstance(123)
.build()))
.ebsOptimized(false)
.build())
.priority(123)
.weightedCapacity(123)
.build()))
.launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder()
.onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder()
.allocationStrategy("allocationStrategy")
// the properties below are optional
.capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
.capacityReservationPreference("capacityReservationPreference")
.capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
.usageStrategy("usageStrategy")
.build())
.build())
.spotSpecification(SpotProvisioningSpecificationProperty.builder()
.timeoutAction("timeoutAction")
.timeoutDurationMinutes(123)
// the properties below are optional
.allocationStrategy("allocationStrategy")
.blockDurationMinutes(123)
.build())
.build())
.name("name")
.resizeSpecifications(InstanceFleetResizingSpecificationsProperty.builder()
.onDemandResizeSpecification(OnDemandResizingSpecificationProperty.builder()
.allocationStrategy("allocationStrategy")
.capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
.capacityReservationPreference("capacityReservationPreference")
.capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
.usageStrategy("usageStrategy")
.build())
.timeoutDurationMinutes(123)
.build())
.spotResizeSpecification(SpotResizingSpecificationProperty.builder()
.allocationStrategy("allocationStrategy")
.timeoutDurationMinutes(123)
.build())
.build())
.targetOnDemandCapacity(123)
.targetSpotCapacity(123)
.build())
.masterInstanceGroup(InstanceGroupConfigProperty.builder()
.instanceCount(123)
.instanceType("instanceType")
// the properties below are optional
.autoScalingPolicy(AutoScalingPolicyProperty.builder()
.constraints(ScalingConstraintsProperty.builder()
.maxCapacity(123)
.minCapacity(123)
.build())
.rules(List.of(ScalingRuleProperty.builder()
.action(ScalingActionProperty.builder()
.simpleScalingPolicyConfiguration(SimpleScalingPolicyConfigurationProperty.builder()
.scalingAdjustment(123)
// the properties below are optional
.adjustmentType("adjustmentType")
.coolDown(123)
.build())
// the properties below are optional
.market("market")
.build())
.name("name")
.trigger(ScalingTriggerProperty.builder()
.cloudWatchAlarmDefinition(CloudWatchAlarmDefinitionProperty.builder()
.comparisonOperator("comparisonOperator")
.metricName("metricName")
.period(123)
.threshold(123)
// the properties below are optional
.dimensions(List.of(MetricDimensionProperty.builder()
.key("key")
.value("value")
.build()))
.evaluationPeriods(123)
.namespace("namespace")
.statistic("statistic")
.unit("unit")
.build())
.build())
// the properties below are optional
.description("description")
.build()))
.build())
.bidPrice("bidPrice")
.configurations(List.of(ConfigurationProperty.builder()
.classification("classification")
.configurationProperties(Map.of(
"configurationPropertiesKey", "configurationProperties"))
.configurations(List.of(configurationProperty_))
.build()))
.customAmiId("customAmiId")
.ebsConfiguration(EbsConfigurationProperty.builder()
.ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
.volumeSpecification(VolumeSpecificationProperty.builder()
.sizeInGb(123)
.volumeType("volumeType")
// the properties below are optional
.iops(123)
.throughput(123)
.build())
// the properties below are optional
.volumesPerInstance(123)
.build()))
.ebsOptimized(false)
.build())
.market("market")
.name("name")
.build())
.placement(PlacementTypeProperty.builder()
.availabilityZone("availabilityZone")
.build())
.serviceAccessSecurityGroup("serviceAccessSecurityGroup")
.taskInstanceFleets(List.of(InstanceFleetConfigProperty.builder()
.instanceTypeConfigs(List.of(InstanceTypeConfigProperty.builder()
.instanceType("instanceType")
// the properties below are optional
.bidPrice("bidPrice")
.bidPriceAsPercentageOfOnDemandPrice(123)
.configurations(List.of(ConfigurationProperty.builder()
.classification("classification")
.configurationProperties(Map.of(
"configurationPropertiesKey", "configurationProperties"))
.configurations(List.of(configurationProperty_))
.build()))
.customAmiId("customAmiId")
.ebsConfiguration(EbsConfigurationProperty.builder()
.ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
.volumeSpecification(VolumeSpecificationProperty.builder()
.sizeInGb(123)
.volumeType("volumeType")
// the properties below are optional
.iops(123)
.throughput(123)
.build())
// the properties below are optional
.volumesPerInstance(123)
.build()))
.ebsOptimized(false)
.build())
.priority(123)
.weightedCapacity(123)
.build()))
.launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder()
.onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder()
.allocationStrategy("allocationStrategy")
// the properties below are optional
.capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
.capacityReservationPreference("capacityReservationPreference")
.capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
.usageStrategy("usageStrategy")
.build())
.build())
.spotSpecification(SpotProvisioningSpecificationProperty.builder()
.timeoutAction("timeoutAction")
.timeoutDurationMinutes(123)
// the properties below are optional
.allocationStrategy("allocationStrategy")
.blockDurationMinutes(123)
.build())
.build())
.name("name")
.resizeSpecifications(InstanceFleetResizingSpecificationsProperty.builder()
.onDemandResizeSpecification(OnDemandResizingSpecificationProperty.builder()
.allocationStrategy("allocationStrategy")
.capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
.capacityReservationPreference("capacityReservationPreference")
.capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
.usageStrategy("usageStrategy")
.build())
.timeoutDurationMinutes(123)
.build())
.spotResizeSpecification(SpotResizingSpecificationProperty.builder()
.allocationStrategy("allocationStrategy")
.timeoutDurationMinutes(123)
.build())
.build())
.targetOnDemandCapacity(123)
.targetSpotCapacity(123)
.build()))
.taskInstanceGroups(List.of(InstanceGroupConfigProperty.builder()
.instanceCount(123)
.instanceType("instanceType")
// the properties below are optional
.autoScalingPolicy(AutoScalingPolicyProperty.builder()
.constraints(ScalingConstraintsProperty.builder()
.maxCapacity(123)
.minCapacity(123)
.build())
.rules(List.of(ScalingRuleProperty.builder()
.action(ScalingActionProperty.builder()
.simpleScalingPolicyConfiguration(SimpleScalingPolicyConfigurationProperty.builder()
.scalingAdjustment(123)
// the properties below are optional
.adjustmentType("adjustmentType")
.coolDown(123)
.build())
// the properties below are optional
.market("market")
.build())
.name("name")
.trigger(ScalingTriggerProperty.builder()
.cloudWatchAlarmDefinition(CloudWatchAlarmDefinitionProperty.builder()
.comparisonOperator("comparisonOperator")
.metricName("metricName")
.period(123)
.threshold(123)
// the properties below are optional
.dimensions(List.of(MetricDimensionProperty.builder()
.key("key")
.value("value")
.build()))
.evaluationPeriods(123)
.namespace("namespace")
.statistic("statistic")
.unit("unit")
.build())
.build())
// the properties below are optional
.description("description")
.build()))
.build())
.bidPrice("bidPrice")
.configurations(List.of(ConfigurationProperty.builder()
.classification("classification")
.configurationProperties(Map.of(
"configurationPropertiesKey", "configurationProperties"))
.configurations(List.of(configurationProperty_))
.build()))
.customAmiId("customAmiId")
.ebsConfiguration(EbsConfigurationProperty.builder()
.ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
.volumeSpecification(VolumeSpecificationProperty.builder()
.sizeInGb(123)
.volumeType("volumeType")
// the properties below are optional
.iops(123)
.throughput(123)
.build())
// the properties below are optional
.volumesPerInstance(123)
.build()))
.ebsOptimized(false)
.build())
.market("market")
.name("name")
.build()))
.terminationProtected(false)
.unhealthyNodeReplacement(false)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnCluster.JobFlowInstancesConfigPropertystatic final classAn implementation forCfnCluster.JobFlowInstancesConfigProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()A list of additional Amazon EC2 security group IDs for the master node.A list of additional Amazon EC2 security group IDs for the core and task nodes.default ObjectDescribes the EC2 instances and instance configurations for the core instance fleet when using clusters with the instance fleet configuration.default ObjectDescribes the EC2 instances and instance configurations for core instance groups when using clusters with the uniform instance group configuration.default StringThe name of the Amazon EC2 key pair that can be used to connect to the master node using SSH as the user called "hadoop.".default StringApplies to clusters that use the uniform instance group configuration.Applies to clusters that use the instance fleet configuration.default StringThe identifier of the Amazon EC2 security group for the master node.default StringThe identifier of the Amazon EC2 security group for the core and task nodes.default StringApplies only to Amazon EMR release versions earlier than 4.0.default ObjectSpecifies whether the cluster should remain available after completing all steps.default ObjectDescribes the EC2 instances and instance configurations for the master instance fleet when using clusters with the instance fleet configuration.default ObjectDescribes the EC2 instances and instance configurations for the master instance group when using clusters with the uniform instance group configuration.default ObjectThe Availability Zone in which the cluster runs.default StringThe identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.default ObjectDescribes the EC2 instances and instance configurations for the task instance fleets when using clusters with the instance fleet configuration.default ObjectDescribes the EC2 instances and instance configurations for task instance groups when using clusters with the uniform instance group configuration.default ObjectSpecifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.default ObjectIndicates whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAdditionalMasterSecurityGroups
A list of additional Amazon EC2 security group IDs for the master node.- See Also:
-
getAdditionalSlaveSecurityGroups
A list of additional Amazon EC2 security group IDs for the core and task nodes.- See Also:
-
getCoreInstanceFleet
Describes the EC2 instances and instance configurations for the core instance fleet when using clusters with the instance fleet configuration.Returns union: either
IResolvableorCfnCluster.InstanceFleetConfigProperty- See Also:
-
getCoreInstanceGroup
Describes the EC2 instances and instance configurations for core instance groups when using clusters with the uniform instance group configuration.Returns union: either
IResolvableorCfnCluster.InstanceGroupConfigProperty- See Also:
-
getEc2KeyName
The name of the Amazon EC2 key pair that can be used to connect to the master node using SSH as the user called "hadoop.".- See Also:
-
getEc2SubnetId
Applies to clusters that use the uniform instance group configuration.To launch the cluster in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value and your account supports EC2-Classic, the cluster launches in EC2-Classic.
- See Also:
-
getEc2SubnetIds
Applies to clusters that use the instance fleet configuration.When multiple Amazon EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances in the optimal subnet.
The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.
- See Also:
-
getEmrManagedMasterSecurityGroup
The identifier of the Amazon EC2 security group for the master node.If you specify
EmrManagedMasterSecurityGroup, you must also specifyEmrManagedSlaveSecurityGroup.- See Also:
-
getEmrManagedSlaveSecurityGroup
The identifier of the Amazon EC2 security group for the core and task nodes.If you specify
EmrManagedSlaveSecurityGroup, you must also specifyEmrManagedMasterSecurityGroup.- See Also:
-
getHadoopVersion
Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless theAmiVersionparameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.- See Also:
-
getKeepJobFlowAliveWhenNoSteps
Specifies whether the cluster should remain available after completing all steps.Defaults to
false. For more information about configuring cluster termination, see Control Cluster Termination in the EMR Management Guide .Returns union: either
BooleanorIResolvable- See Also:
-
getMasterInstanceFleet
Describes the EC2 instances and instance configurations for the master instance fleet when using clusters with the instance fleet configuration.Returns union: either
IResolvableorCfnCluster.InstanceFleetConfigProperty- See Also:
-
getMasterInstanceGroup
Describes the EC2 instances and instance configurations for the master instance group when using clusters with the uniform instance group configuration.Returns union: either
IResolvableorCfnCluster.InstanceGroupConfigProperty- See Also:
-
getPlacement
The Availability Zone in which the cluster runs.Returns union: either
IResolvableorCfnCluster.PlacementTypeProperty- See Also:
-
getServiceAccessSecurityGroup
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.- See Also:
-
getTaskInstanceFleets
Describes the EC2 instances and instance configurations for the task instance fleets when using clusters with the instance fleet configuration.These task instance fleets are added to the cluster as part of the cluster launch. Each task instance fleet must have a unique name specified so that CloudFormation can differentiate between the task instance fleets.
You can currently specify only one task instance fleet for a cluster. After creating the cluster, you can only modify the mutable properties of
InstanceFleetConfig, which areTargetOnDemandCapacityandTargetSpotCapacity. Modifying any other property results in cluster replacement. > To allow a maximum of 30 Amazon EC2 instance types per fleet, includeTaskInstanceFleetswhen you create your cluster. If you create your cluster withoutTaskInstanceFleets, Amazon EMR uses its default allocation strategy, which allows for a maximum of five Amazon EC2 instance types.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnCluster.InstanceFleetConfigProperty>- See Also:
-
getTaskInstanceGroups
Describes the EC2 instances and instance configurations for task instance groups when using clusters with the uniform instance group configuration.These task instance groups are added to the cluster as part of the cluster launch. Each task instance group must have a unique name specified so that CloudFormation can differentiate between the task instance groups.
After creating the cluster, you can only modify the mutable properties of
InstanceGroupConfig, which areAutoScalingPolicyandInstanceCount. Modifying any other property results in cluster replacement.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnCluster.InstanceGroupConfigProperty>- See Also:
-
getTerminationProtected
Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.Returns union: either
BooleanorIResolvable- See Also:
-
getUnhealthyNodeReplacement
Indicates whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster.Returns union: either
BooleanorIResolvable- See Also:
-
builder
-