@Stability(value=Stable)
public static interface CfnCluster.JobFlowInstancesConfigProperty
extends software.amazon.jsii.JsiiSerializable
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)
.build())
// the properties below are optional
.volumesPerInstance(123)
.build()))
.ebsOptimized(false)
.build())
.weightedCapacity(123)
.build()))
.launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder()
.onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder()
.allocationStrategy("allocationStrategy")
.build())
.spotSpecification(SpotProvisioningSpecificationProperty.builder()
.timeoutAction("timeoutAction")
.timeoutDurationMinutes(123)
// the properties below are optional
.allocationStrategy("allocationStrategy")
.blockDurationMinutes(123)
.build())
.build())
.name("name")
.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)
.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)
.build())
// the properties below are optional
.volumesPerInstance(123)
.build()))
.ebsOptimized(false)
.build())
.weightedCapacity(123)
.build()))
.launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder()
.onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder()
.allocationStrategy("allocationStrategy")
.build())
.spotSpecification(SpotProvisioningSpecificationProperty.builder()
.timeoutAction("timeoutAction")
.timeoutDurationMinutes(123)
// the properties below are optional
.allocationStrategy("allocationStrategy")
.blockDurationMinutes(123)
.build())
.build())
.name("name")
.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)
.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)
.build())
// the properties below are optional
.volumesPerInstance(123)
.build()))
.ebsOptimized(false)
.build())
.weightedCapacity(123)
.build()))
.launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder()
.onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder()
.allocationStrategy("allocationStrategy")
.build())
.spotSpecification(SpotProvisioningSpecificationProperty.builder()
.timeoutAction("timeoutAction")
.timeoutDurationMinutes(123)
// the properties below are optional
.allocationStrategy("allocationStrategy")
.blockDurationMinutes(123)
.build())
.build())
.name("name")
.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)
.build())
// the properties below are optional
.volumesPerInstance(123)
.build()))
.ebsOptimized(false)
.build())
.market("market")
.name("name")
.build()))
.terminationProtected(false)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnCluster.JobFlowInstancesConfigProperty.Builder
A builder for
CfnCluster.JobFlowInstancesConfigProperty |
static class |
CfnCluster.JobFlowInstancesConfigProperty.Jsii$Proxy
An implementation for
CfnCluster.JobFlowInstancesConfigProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnCluster.JobFlowInstancesConfigProperty.Builder |
builder() |
default List<String> |
getAdditionalMasterSecurityGroups()
A list of additional Amazon EC2 security group IDs for the master node.
|
default List<String> |
getAdditionalSlaveSecurityGroups()
A list of additional Amazon EC2 security group IDs for the core and task nodes.
|
default Object |
getCoreInstanceFleet()
Describes the EC2 instances and instance configurations for the core instance fleet when using clusters with the instance fleet configuration.
|
default Object |
getCoreInstanceGroup()
Describes the EC2 instances and instance configurations for core instance groups when using clusters with the uniform instance group configuration.
|
default String |
getEc2KeyName()
The name of the EC2 key pair that can be used to connect to the master node using SSH as the user called "hadoop.".
|
default String |
getEc2SubnetId()
Applies to clusters that use the uniform instance group configuration.
|
default List<String> |
getEc2SubnetIds()
Applies to clusters that use the instance fleet configuration.
|
default String |
getEmrManagedMasterSecurityGroup()
The identifier of the Amazon EC2 security group for the master node.
|
default String |
getEmrManagedSlaveSecurityGroup()
The identifier of the Amazon EC2 security group for the core and task nodes.
|
default String |
getHadoopVersion()
Applies only to Amazon EMR release versions earlier than 4.0.
|
default Object |
getKeepJobFlowAliveWhenNoSteps()
Specifies whether the cluster should remain available after completing all steps.
|
default Object |
getMasterInstanceFleet()
Describes the EC2 instances and instance configurations for the master instance fleet when using clusters with the instance fleet configuration.
|
default Object |
getMasterInstanceGroup()
Describes the EC2 instances and instance configurations for the master instance group when using clusters with the uniform instance group configuration.
|
default Object |
getPlacement()
The Availability Zone in which the cluster runs.
|
default String |
getServiceAccessSecurityGroup()
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
|
default Object |
getTaskInstanceFleets()
`CfnCluster.JobFlowInstancesConfigProperty.TaskInstanceFleets`.
|
default Object |
getTaskInstanceGroups()
`CfnCluster.JobFlowInstancesConfigProperty.TaskInstanceGroups`.
|
default Object |
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.
|
@Stability(value=Stable) @Nullable default List<String> getAdditionalMasterSecurityGroups()
@Stability(value=Stable) @Nullable default List<String> getAdditionalSlaveSecurityGroups()
@Stability(value=Stable) @Nullable default Object getCoreInstanceFleet()
@Stability(value=Stable) @Nullable default Object getCoreInstanceGroup()
@Stability(value=Stable) @Nullable default String getEc2KeyName()
@Stability(value=Stable) @Nullable default String getEc2SubnetId()
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.
@Stability(value=Stable) @Nullable default List<String> getEc2SubnetIds()
When multiple 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 versions 4.8.0 and later, excluding 5.0.x versions.
@Stability(value=Stable) @Nullable default String getEmrManagedMasterSecurityGroup()
If you specify EmrManagedMasterSecurityGroup , you must also specify EmrManagedSlaveSecurityGroup .
@Stability(value=Stable) @Nullable default String getEmrManagedSlaveSecurityGroup()
If you specify EmrManagedSlaveSecurityGroup , you must also specify EmrManagedMasterSecurityGroup .
@Stability(value=Stable) @Nullable default String getHadoopVersion()
@Stability(value=Stable) @Nullable default Object getKeepJobFlowAliveWhenNoSteps()
Defaults to true . For more information about configuring cluster termination, see Control Cluster Termination in the EMR Management Guide .
@Stability(value=Stable) @Nullable default Object getMasterInstanceFleet()
@Stability(value=Stable) @Nullable default Object getMasterInstanceGroup()
@Stability(value=Stable) @Nullable default Object getPlacement()
@Stability(value=Stable) @Nullable default String getServiceAccessSecurityGroup()
@Stability(value=Stable) @Nullable default Object getTaskInstanceFleets()
@Stability(value=Stable) @Nullable default Object getTaskInstanceGroups()
@Stability(value=Stable) @Nullable default Object getTerminationProtected()
@Stability(value=Stable) static CfnCluster.JobFlowInstancesConfigProperty.Builder builder()
Copyright © 2022. All rights reserved.