public static interface CfnCluster.JobFlowInstancesConfigProperty
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") .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 java.util.List<java.lang.String> |
getAdditionalMasterSecurityGroups()
A list of additional Amazon EC2 security group IDs for the master node.
|
default java.util.List<java.lang.String> |
getAdditionalSlaveSecurityGroups()
A list of additional Amazon EC2 security group IDs for the core and task nodes.
|
default java.lang.Object |
getCoreInstanceFleet()
Describes the EC2 instances and instance configurations for the core instance fleet when using clusters with the instance fleet configuration.
|
default java.lang.Object |
getCoreInstanceGroup()
Describes the EC2 instances and instance configurations for core instance groups when using clusters with the uniform instance group configuration.
|
default java.lang.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 java.lang.String |
getEc2SubnetId()
Applies to clusters that use the uniform instance group configuration.
|
default java.util.List<java.lang.String> |
getEc2SubnetIds()
Applies to clusters that use the instance fleet configuration.
|
default java.lang.String |
getEmrManagedMasterSecurityGroup()
The identifier of the Amazon EC2 security group for the master node.
|
default java.lang.String |
getEmrManagedSlaveSecurityGroup()
The identifier of the Amazon EC2 security group for the core and task nodes.
|
default java.lang.String |
getHadoopVersion()
Applies only to Amazon EMR release versions earlier than 4.0.
|
default java.lang.Object |
getKeepJobFlowAliveWhenNoSteps()
Specifies whether the cluster should remain available after completing all steps.
|
default java.lang.Object |
getMasterInstanceFleet()
Describes the EC2 instances and instance configurations for the master instance fleet when using clusters with the instance fleet configuration.
|
default java.lang.Object |
getMasterInstanceGroup()
Describes the EC2 instances and instance configurations for the master instance group when using clusters with the uniform instance group configuration.
|
default java.lang.Object |
getPlacement()
The Availability Zone in which the cluster runs.
|
default java.lang.String |
getServiceAccessSecurityGroup()
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
|
default java.lang.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.
|
default java.util.List<java.lang.String> getAdditionalMasterSecurityGroups()
default java.util.List<java.lang.String> getAdditionalSlaveSecurityGroups()
default java.lang.Object getCoreInstanceFleet()
default java.lang.Object getCoreInstanceGroup()
default java.lang.String getEc2KeyName()
default java.lang.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.
default java.util.List<java.lang.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.
default java.lang.String getEmrManagedMasterSecurityGroup()
If you specify EmrManagedMasterSecurityGroup
, you must also specify EmrManagedSlaveSecurityGroup
.
default java.lang.String getEmrManagedSlaveSecurityGroup()
If you specify EmrManagedSlaveSecurityGroup
, you must also specify EmrManagedMasterSecurityGroup
.
default java.lang.String getHadoopVersion()
default java.lang.Object getKeepJobFlowAliveWhenNoSteps()
Defaults to true
. For more information about configuring cluster termination, see Control Cluster Termination in the EMR Management Guide .
default java.lang.Object getMasterInstanceFleet()
default java.lang.Object getMasterInstanceGroup()
default java.lang.Object getPlacement()
default java.lang.String getServiceAccessSecurityGroup()
default java.lang.Object getTerminationProtected()
static CfnCluster.JobFlowInstancesConfigProperty.Builder builder()