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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
JobFlowInstancesConfig.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
additionalMasterSecurityGroups()
A list of additional Amazon EC2 security group IDs for the master node.List<String>
additionalSlaveSecurityGroups()
A list of additional Amazon EC2 security group IDs for the core and task nodes.static JobFlowInstancesConfig.Builder
builder()
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."String
ec2SubnetId()
Applies to clusters that use the uniform instance group configuration.List<String>
ec2SubnetIds()
Applies to clusters that use the instance fleet configuration.String
emrManagedMasterSecurityGroup()
The identifier of the Amazon EC2 security group for the master node.String
emrManagedSlaveSecurityGroup()
The identifier of the Amazon EC2 security group for the core and task nodes.boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
String
hadoopVersion()
Applies only to Amazon EMR release versions earlier than 4.0.boolean
hasAdditionalMasterSecurityGroups()
For responses, this returns true if the service returned a value for the AdditionalMasterSecurityGroups property.boolean
hasAdditionalSlaveSecurityGroups()
For responses, this returns true if the service returned a value for the AdditionalSlaveSecurityGroups property.boolean
hasEc2SubnetIds()
For responses, this returns true if the service returned a value for the Ec2SubnetIds property.int
hashCode()
boolean
hasInstanceFleets()
For responses, this returns true if the service returned a value for the InstanceFleets property.boolean
hasInstanceGroups()
For responses, this returns true if the service returned a value for the InstanceGroups property.Integer
instanceCount()
The number of Amazon EC2 instances in the cluster.List<InstanceFleetConfig>
instanceFleets()
List<InstanceGroupConfig>
instanceGroups()
Configuration for the instance groups in a cluster.Boolean
keepJobFlowAliveWhenNoSteps()
Specifies whether the cluster should remain available after completing all steps.String
masterInstanceType()
The Amazon EC2 instance type of the master node.PlacementType
placement()
The Availability Zone in which the cluster runs.List<SdkField<?>>
sdkFields()
static Class<? extends JobFlowInstancesConfig.Builder>
serializableBuilderClass()
String
serviceAccessSecurityGroup()
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.String
slaveInstanceType()
The Amazon EC2 instance type of the core and task nodes.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.JobFlowInstancesConfig.Builder
toBuilder()
String
toString()
Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
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 theisEmpty()
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 theisEmpty()
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
true
. 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
true
. 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.
-
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 theisEmpty()
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 specifyEmrManagedSlaveSecurityGroup
.- Returns:
- The identifier of the Amazon EC2 security group for the master node. If you specify
EmrManagedMasterSecurityGroup
, you must also specifyEmrManagedSlaveSecurityGroup
.
-
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 specifyEmrManagedMasterSecurityGroup
.- Returns:
- The identifier of the Amazon EC2 security group for the core and task nodes. If you specify
EmrManagedSlaveSecurityGroup
, you must also specifyEmrManagedMasterSecurityGroup
.
-
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 theisEmpty()
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 theisEmpty()
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()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<JobFlowInstancesConfig.Builder,JobFlowInstancesConfig>
-
builder
public static JobFlowInstancesConfig.Builder builder()
-
serializableBuilderClass
public static Class<? extends JobFlowInstancesConfig.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
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.
-
-