Class JobFlowInstancesConfig

java.lang.Object
software.amazon.awssdk.services.emr.model.JobFlowInstancesConfig
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<JobFlowInstancesConfig.Builder,JobFlowInstancesConfig>

@Generated("software.amazon.awssdk:codegen") public final class JobFlowInstancesConfig extends Object implements SdkPojo, Serializable, ToCopyableBuilder<JobFlowInstancesConfig.Builder,JobFlowInstancesConfig>

A description of the Amazon EC2 instance on which the cluster (job flow) runs. A valid JobFlowInstancesConfig must contain either InstanceGroups or InstanceFleets. They cannot be used together. You may also have MasterInstanceType, SlaveInstanceType, and InstanceCount (all three must be present), but we don't recommend this configuration.

See Also:
  • Method Details

    • masterInstanceType

      public final String masterInstanceType()

      The Amazon EC2 instance type of the master node.

      Returns:
      The Amazon EC2 instance type of the master node.
    • slaveInstanceType

      public final String slaveInstanceType()

      The Amazon EC2 instance type of the core and task nodes.

      Returns:
      The Amazon EC2 instance type of the core and task nodes.
    • instanceCount

      public final Integer instanceCount()

      The number of Amazon EC2 instances in the cluster.

      Returns:
      The number of Amazon EC2 instances in the cluster.
    • hasInstanceGroups

      public final boolean hasInstanceGroups()
      For responses, this returns true if the service returned a value for the InstanceGroups property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • instanceGroups

      public final List<InstanceGroupConfig> instanceGroups()

      Configuration for the instance groups in a cluster.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasInstanceGroups() method.

      Returns:
      Configuration for the instance groups in a cluster.
    • hasInstanceFleets

      public final boolean hasInstanceFleets()
      For responses, this returns true if the service returned a value for the InstanceFleets property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • instanceFleets

      public final List<InstanceFleetConfig> instanceFleets()

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

      Describes the Amazon EC2 instances and instance configurations for clusters that use the instance fleet configuration.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasInstanceFleets() method.

      Returns:

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

      Describes the Amazon EC2 instances and instance configurations for clusters that use the instance fleet configuration.

    • ec2KeyName

      public final String ec2KeyName()

      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."

      Returns:
      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."
    • placement

      public final PlacementType placement()

      The Availability Zone in which the cluster runs.

      Returns:
      The Availability Zone in which the cluster runs.
    • keepJobFlowAliveWhenNoSteps

      public final Boolean keepJobFlowAliveWhenNoSteps()

      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:
      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.
    • terminationProtected

      public final Boolean terminationProtected()

      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:
      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.
    • unhealthyNodeReplacement

      public final Boolean unhealthyNodeReplacement()

      Indicates whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster.

      Returns:
      Indicates whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster.
    • hadoopVersion

      public final String hadoopVersion()

      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 the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.

      Returns:
      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 the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.
    • ec2SubnetId

      public final String ec2SubnetId()

      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.

      Returns:
      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.
    • hasEc2SubnetIds

      public final boolean hasEc2SubnetIds()
      For responses, this returns true if the service returned a value for the Ec2SubnetIds property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • ec2SubnetIds

      public final List<String> ec2SubnetIds()

      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.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasEc2SubnetIds() method.

      Returns:
      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.

    • emrManagedMasterSecurityGroup

      public final String emrManagedMasterSecurityGroup()

      The identifier of the Amazon EC2 security group for the master node. If you specify EmrManagedMasterSecurityGroup, you must also specify EmrManagedSlaveSecurityGroup.

      Returns:
      The identifier of the Amazon EC2 security group for the master node. If you specify EmrManagedMasterSecurityGroup, you must also specify EmrManagedSlaveSecurityGroup.
    • emrManagedSlaveSecurityGroup

      public final String emrManagedSlaveSecurityGroup()

      The identifier of the Amazon EC2 security group for the core and task nodes. If you specify EmrManagedSlaveSecurityGroup, you must also specify EmrManagedMasterSecurityGroup.

      Returns:
      The identifier of the Amazon EC2 security group for the core and task nodes. If you specify EmrManagedSlaveSecurityGroup, you must also specify EmrManagedMasterSecurityGroup.
    • serviceAccessSecurityGroup

      public final String serviceAccessSecurityGroup()

      The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.

      Returns:
      The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
    • hasAdditionalMasterSecurityGroups

      public final boolean hasAdditionalMasterSecurityGroups()
      For responses, this returns true if the service returned a value for the AdditionalMasterSecurityGroups property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • additionalMasterSecurityGroups

      public final List<String> additionalMasterSecurityGroups()

      A list of additional Amazon EC2 security group IDs for the master node.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasAdditionalMasterSecurityGroups() method.

      Returns:
      A list of additional Amazon EC2 security group IDs for the master node.
    • hasAdditionalSlaveSecurityGroups

      public final boolean hasAdditionalSlaveSecurityGroups()
      For responses, this returns true if the service returned a value for the AdditionalSlaveSecurityGroups property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • additionalSlaveSecurityGroups

      public final List<String> additionalSlaveSecurityGroups()

      A list of additional Amazon EC2 security group IDs for the core and task nodes.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasAdditionalSlaveSecurityGroups() method.

      Returns:
      A list of additional Amazon EC2 security group IDs for the core and task nodes.
    • toBuilder

      public JobFlowInstancesConfig.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<JobFlowInstancesConfig.Builder,JobFlowInstancesConfig>
      Returns:
      a builder for type T
    • builder

      public static JobFlowInstancesConfig.Builder builder()
    • serializableBuilderClass

      public static Class<? extends JobFlowInstancesConfig.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.