Interface CfnCluster.InstanceFleetConfigProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnCluster.InstanceFleetConfigProperty.Jsii$Proxy
Enclosing class:
CfnCluster

@Stability(Stable) public static interface CfnCluster.InstanceFleetConfigProperty extends software.amazon.jsii.JsiiSerializable
Use InstanceFleetConfig to define instance fleets for an EMR cluster.

A cluster can not use both instance fleets and instance groups. For more information, see Configure Instance Fleets in the Amazon EMR Management Guide .

The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.

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_;
 InstanceFleetConfigProperty instanceFleetConfigProperty = 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();
 
  • Method Details

    • getInstanceTypeConfigs

      @Stability(Stable) @Nullable default Object getInstanceTypeConfigs()
      The instance type configurations that define the Amazon EC2 instances in the instance fleet.
    • getLaunchSpecifications

      @Stability(Stable) @Nullable default Object getLaunchSpecifications()
      The launch specification for the instance fleet.
    • getName

      @Stability(Stable) @Nullable default String getName()
      The friendly name of the instance fleet.
    • getTargetOnDemandCapacity

      @Stability(Stable) @Nullable default Number getTargetOnDemandCapacity()
      The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

      When the instance fleet launches, Amazon EMR tries to provision On-Demand instances as specified by InstanceTypeConfig . Each instance configuration has a specified WeightedCapacity . When an On-Demand instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.

      If not specified or set to 0, only Spot instances are provisioned for the instance fleet using TargetSpotCapacity . At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.

    • getTargetSpotCapacity

      @Stability(Stable) @Nullable default Number getTargetSpotCapacity()
      The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

      When the instance fleet launches, Amazon EMR tries to provision Spot instances as specified by InstanceTypeConfig . Each instance configuration has a specified WeightedCapacity . When a Spot instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.

      If not specified or set to 0, only On-Demand instances are provisioned for the instance fleet. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.

    • builder

      @Stability(Stable) static CfnCluster.InstanceFleetConfigProperty.Builder builder()
      Returns:
      a CfnCluster.InstanceFleetConfigProperty.Builder of CfnCluster.InstanceFleetConfigProperty